This commit is contained in:
tmshv committed 2015-02-28 19:17:40 +03:00
1 parent f6a43ca7e1
commit 38381b5605
2 files changed
+18 -6

No files matched your search

+14 -4
View File
@@ -14,22 +14,26 @@ app.config(function ($locationProvider, $routeProvider) {
{
name: "/",
templateUrl: "/views/home.html",
controller: "HomePageController"
controller: "HomePageController",
title:"ДШХ Шлиссельбурга"
},
{
name: "/schedule",
templateUrl: "/views/schedule.html",
controller: "SchedulePageController"
controller: "SchedulePageController",
title:"Расписание"
},
{
name: "/team",
templateUrl: "/views/team.html",
controller: "TeamPageController"
controller: "TeamPageController",
title:"Преподаватели"
},
{
name: "/docs",
templateUrl: "/views/docs.html",
controller: "DocsPageController"
controller: "DocsPageController",
title: "Документы"
}
];
@@ -42,6 +46,12 @@ app.config(function ($locationProvider, $routeProvider) {
});
});
app.run(function($location, $rootScope) {
$rootScope.$on("$routeChangeSuccess", function (event, current, previous) {
$rootScope.title = current.$$route.title;
});
});
require("./api/api")(app);
require("./ui/menu")(app);
require("./ui/timeline")(app);
+4 -2
View File
@@ -1,9 +1,11 @@
<!DOCTYPE html>
<html>
<html ng-app="hudozhka">
<head>
<base href="/">
<meta name="fragment" content="!">
<title ng-bind="title">ДШХ Шлиссельбурга</title>
<link rel="stylesheet" href="/style.css">
<link rel="stylesheet" href="/s/animate.min.css">
<link rel="stylesheet" href="/fonts/stylesheet.css">
@@ -40,7 +42,7 @@
// ga('send', 'pageview');
</script>
</head>
<body ng-app="hudozhka">
<body>
<div class="menu" ng-controller="MenuController">
<ul>
<li ng-repeat="item in menu" class="{{item.color}}" ng-class="{selected:isCurrent(item)}">