angular.module('app').run(['$rootScope', '$state', '$stateParams',
    function($rootScope, $state, $stateParams) {
        $rootScope.$state = $state;
        $rootScope.$stateParams = $stateParams;
    }
]).config(['$stateProvider', '$urlRouterProvider',
    function($stateProvider, $urlRouterProvider) {
        $urlRouterProvider.otherwise('/mangerWeb'); //
        $stateProvider.state('login', {
                url: '/login',
                templateUrl: 'templates/login.html',
                controller: 'WebMangerController'
            })
            .state('login.password', {
                url: '/password',
                templateUrl: 'templates/password.html',
                controller: 'WebMangerController'
            })
            .state('login.create', {
                url: '/create',
                templateUrl: 'templates/create.html',
                controller: 'WebMangerController'
            })
            .state('mangerWeb', {
                url: '/mangerWeb',
                templateUrl: 'templates/mangerWeb.html',
                controller: 'WebMangerController'
            });
    }
]);