Browse Source

added pages titles

tags/1.0.0
Robin Thoni 8 years ago
parent
commit
e27197e34a
2 changed files with 7 additions and 2 deletions
  1. 6
    1
      app/app.js
  2. 1
    1
      app/index.html

+ 6
- 1
app/app.js View File

16
 
16
 
17
         $stateProvider.state('home', {
17
         $stateProvider.state('home', {
18
             url:'/groups?group',
18
             url:'/groups?group',
19
+            title: "Courses",
19
             reloadOnSearch: false,
20
             reloadOnSearch: false,
20
             templateUrl:'views/home.html',
21
             templateUrl:'views/home.html',
21
             controller:'HomeController'
22
             controller:'HomeController'
23
 
24
 
24
         $stateProvider.state('rooms', {
25
         $stateProvider.state('rooms', {
25
             url:'/rooms?group',
26
             url:'/rooms?group',
27
+            title: "Rooms",
26
             reloadOnSearch: false,
28
             reloadOnSearch: false,
27
             templateUrl:'views/home.html',
29
             templateUrl:'views/home.html',
28
             controller:'HomeController'
30
             controller:'HomeController'
30
 
32
 
31
         $stateProvider.state('freeroom', {
33
         $stateProvider.state('freeroom', {
32
             url:'/freeroom',
34
             url:'/freeroom',
35
+            title: "Free Rooms",
33
             templateUrl:'views/freeroom.html',
36
             templateUrl:'views/freeroom.html',
34
             controller:'FreeRoomController'
37
             controller:'FreeRoomController'
35
         });
38
         });
57
     }])
60
     }])
58
     .run(['$rootScope', '$state', 'DataShareBusiness', 'GroupsBusiness', 'StaffsBusiness', 'RoomsBusiness', '$mdDateLocale', '$filter',
61
     .run(['$rootScope', '$state', 'DataShareBusiness', 'GroupsBusiness', 'StaffsBusiness', 'RoomsBusiness', '$mdDateLocale', '$filter',
59
         function ($rootScope, $state, DataShareBusiness, GroupsBusiness, StaffsBusiness, RoomsBusiness, $mdDateLocale, $filter) {
62
         function ($rootScope, $state, DataShareBusiness, GroupsBusiness, StaffsBusiness, RoomsBusiness, $mdDateLocale, $filter) {
60
-
63
+            $rootScope.$on('$stateChangeSuccess', function (event, current, previous) {
64
+                $rootScope.title = current.title + " - Chronos";
65
+            });
61
 
66
 
62
             var promiseLoadEntities = {
67
             var promiseLoadEntities = {
63
                 id: "promiseLoadEntities",
68
                 id: "promiseLoadEntities",

+ 1
- 1
app/index.html View File

3
 <head>
3
 <head>
4
     <base href="/app/">
4
     <base href="/app/">
5
     <meta charset="utf-8">
5
     <meta charset="utf-8">
6
-    <title>Chronos</title>
6
+    <title ng-bind="title">Chronos</title>
7
 
7
 
8
     <!-- build:css css/globals.css -->
8
     <!-- build:css css/globals.css -->
9
     <link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.min.css">
9
     <link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.min.css">

Loading…
Cancel
Save