


// Declare app level module which depends on filters, and services
/*angular.module('myApp', ['myApp.filters', 'myApp.services', 'myApp.directives', 'myApp.controllers','ngRoute','ui.bootstrap']).
  config(['$routeProvider', function($routeProvider) {
    $routeProvider.when('/', {templateUrl: 'main.html', controller: 'interviewController'});
    $routeProvider.when('/interview', {templateUrl: 'interview/interview.html', controller: 'interviewController'});
    $routeProvider.when('/resume', {templateUrl: 'resume/resume.html', controller: 'resumeController'});
    $routeProvider.when('/point', {templateUrl: 'point/point.html', controller: 'pointController'});
    $routeProvider.when('/employees', {templateUrl: 'employees/employees.html', controller: 'employeesController'})
    $routeProvider.when('/recruit', {templateUrl: 'recruit/recruit.html', controller: 'recruitController'})
    $routeProvider.otherwise({redirectTo: '/'});
  }])
  .run(['$rootScope',function($rootScope){
    $rootScope.nativeId=getCurrentNativeId();
    function getCurrentNativeId(){
      var str = "#/index";
      var href=window.location.href;
      var index = href.indexOf("#/");
      if(index != -1){
        str = href.substring(index,href.length);
      }
      return str;
    }
  }]) */
  angular.module('myApp', ['myApp.filters', 'myApp.services', 'myApp.directives', 'myApp.controllers','ui.router' , 'ui.bootstrap']).
  config(function($stateProvider, $urlRouterProvider) {
    $stateProvider
        .state("config", {
            url: '/config',
            templateUrl: '../compass/app/config/config.html',
            controller: 'configController'
        })
        .state("list", {
            url: '/list',
            templateUrl: '../compass/app/staReport/list.html',
            controller: 'listController'
        })
        .state("summary", {
            url: '/summary',
            templateUrl: '../compass/app/staReport/summary.html',
            controller: 'summaryController'
        })
        var uiserf=$("#uiserf").val();
        $urlRouterProvider.otherwise(uiserf);
  })
  .run(['$rootScope',function($rootScope){
    $rootScope.nativeId=getCurrentNativeId();
    function getCurrentNativeId(){
      var str = "#/index";
      var href=window.location.href;
      var index = href.indexOf("#/");
      if(index != -1){
        str = href.substring(index,href.length);
      }
      return str;
    }
  }])