Update routes, mongoose schema and web flow
This commit is contained in:
30
app/partials/login/login.module.js
Normal file
30
app/partials/login/login.module.js
Normal file
@@ -0,0 +1,30 @@
|
||||
(function(){
|
||||
'use strict';
|
||||
|
||||
angular
|
||||
.module("app.login", ['ui.router', 'ui.bootstrap'])
|
||||
.run(addStateToScope)
|
||||
.config(getRoutes);
|
||||
|
||||
addStateToScope.$inject = ['$rootScope', '$state', '$stateParams'];
|
||||
function addStateToScope($rootScope, $state, $stateParams){
|
||||
$rootScope.$state = $state;
|
||||
$rootScope.$stateParams = $stateParams;
|
||||
};
|
||||
|
||||
getRoutes.$inject = ['$stateProvider', '$urlRouterProvider'];
|
||||
function getRoutes($stateProvider, $urlRouterProvider){
|
||||
$urlRouterProvider.otherwise('/');
|
||||
$stateProvider
|
||||
.state('root', {
|
||||
url: '',
|
||||
views: {
|
||||
content: {
|
||||
templateUrl: 'partials/login/login.html',
|
||||
controller: 'loginCtrl',
|
||||
controllerAs: 'vm'
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
})();
|
||||
Reference in New Issue
Block a user