|
@@ -30,6 +30,7 @@ app.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', '$locationP
|
30
|
30
|
$stateProvider.state('login',{
|
31
|
31
|
url:'/',
|
32
|
32
|
parent: 'root',
|
|
33
|
+ title: "Login",
|
33
|
34
|
templateUrl:'views/login.html',
|
34
|
35
|
controller:'LoginController',
|
35
|
36
|
resolve:{}
|
|
@@ -38,6 +39,7 @@ app.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', '$locationP
|
38
|
39
|
$stateProvider.state('home',{
|
39
|
40
|
url:'/home',
|
40
|
41
|
parent: 'root',
|
|
42
|
+ title: "Home",
|
41
|
43
|
templateUrl:'views/home.html',
|
42
|
44
|
controller:'HomeController',
|
43
|
45
|
revolve:{}
|
|
@@ -65,12 +67,15 @@ app.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', '$locationP
|
65
|
67
|
}])
|
66
|
68
|
.directive('dateNow', ['$filter', function($filter) {
|
67
|
69
|
return {
|
68
|
|
- link: function( $scope, $element, $attrs) {
|
|
70
|
+ link: function($scope, $element, $attrs) {
|
69
|
71
|
$element.text($filter('date')(new Date(), $attrs.dateNow));
|
70
|
72
|
}
|
71
|
73
|
};
|
72
|
74
|
}])
|
73
|
75
|
.run(['$rootScope', '$state',function ($rootScope, $state) {
|
|
76
|
+ $rootScope.$on('$stateChangeSuccess', function (event, current, previous) {
|
|
77
|
+ $rootScope.title = current.title + " - App";
|
|
78
|
+ });
|
74
|
79
|
$rootScope.$on('$stateChangeError', function (e, curr, prev) {
|
75
|
80
|
//$state.go('login');
|
76
|
81
|
});
|