Преглед на файлове

added pages titles

tags/1.0.0
Robin Thoni преди 8 години
родител
ревизия
e27197e34a
променени са 2 файла, в които са добавени 7 реда и са изтрити 2 реда
  1. 6
    1
      app/app.js
  2. 1
    1
      app/index.html

+ 6
- 1
app/app.js Целия файл

@@ -16,6 +16,7 @@ app.config(['$stateProvider', '$urlRouterProvider',
16 16
 
17 17
         $stateProvider.state('home', {
18 18
             url:'/groups?group',
19
+            title: "Courses",
19 20
             reloadOnSearch: false,
20 21
             templateUrl:'views/home.html',
21 22
             controller:'HomeController'
@@ -23,6 +24,7 @@ app.config(['$stateProvider', '$urlRouterProvider',
23 24
 
24 25
         $stateProvider.state('rooms', {
25 26
             url:'/rooms?group',
27
+            title: "Rooms",
26 28
             reloadOnSearch: false,
27 29
             templateUrl:'views/home.html',
28 30
             controller:'HomeController'
@@ -30,6 +32,7 @@ app.config(['$stateProvider', '$urlRouterProvider',
30 32
 
31 33
         $stateProvider.state('freeroom', {
32 34
             url:'/freeroom',
35
+            title: "Free Rooms",
33 36
             templateUrl:'views/freeroom.html',
34 37
             controller:'FreeRoomController'
35 38
         });
@@ -57,7 +60,9 @@ app.config(['$stateProvider', '$urlRouterProvider',
57 60
     }])
58 61
     .run(['$rootScope', '$state', 'DataShareBusiness', 'GroupsBusiness', 'StaffsBusiness', 'RoomsBusiness', '$mdDateLocale', '$filter',
59 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 67
             var promiseLoadEntities = {
63 68
                 id: "promiseLoadEntities",

+ 1
- 1
app/index.html Целия файл

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

Loading…
Отказ
Запис