diff --git a/client/app.js b/client/app.js index 780fffc5..fc65e861 100644 --- a/client/app.js +++ b/client/app.js @@ -62,17 +62,11 @@ app.config(function ($locationProvider, $routeProvider) { }); }); -app.run(function($location, $rootScope, $http, config) { +app.run(function($location, $rootScope, $http) { $rootScope.$on("$routeChangeSuccess", function (event, current) { $rootScope.title = current["$$route"].title; }); - $rootScope.contact = { - address: config.address, - telephone: config.telephone, - email: config.email - }; - $http.defaults.headers.common["Accept"] = "application/json"; }); @@ -90,6 +84,7 @@ require("./pages/schedule")(app); require("./pages/team")(app); require("./pages/gallery")(app); require("./pages/docs")(app); +require("./controllers/ContactsController")(app); require("./controllers/CopyrightController")(app); app.controller("SchedulePageController", function ($scope) { diff --git a/client/controllers/ContactsController.js b/client/controllers/ContactsController.js new file mode 100644 index 00000000..783b07d8 --- /dev/null +++ b/client/controllers/ContactsController.js @@ -0,0 +1,7 @@ +module.exports = function (app) { + app.controller('ContactsController', function ($scope, config) { + $scope.address = config.address; + $scope.telephone = config.telephone; + $scope.email = config.email; + }); +}; \ No newline at end of file diff --git a/templates/main-dev.html b/templates/main-dev.html index 4c8b7092..44b6aec7 100644 --- a/templates/main-dev.html +++ b/templates/main-dev.html @@ -73,12 +73,12 @@ -
+

Контактная информация

-

Адрес: г. Шлиссельбург, ул. 18 января, д. 3

-

Телефон: +7 (81362) 79-123

-

Почта: hudozka@gmail.com

+

Адрес: {{address}}

+

Телефон: {{telephone}}

+

Почта: {{email}}

diff --git a/templates/main.html b/templates/main.html index 87efd8aa..58748215 100644 --- a/templates/main.html +++ b/templates/main.html @@ -90,12 +90,12 @@
-
+

Контактная информация

-

Адрес: г. Шлиссельбург, ул. 18 января, д. 3

-

Телефон: +7 (81362) 79-123

-

Почта: hudozka@gmail.com

+

Адрес: {{address}}

+

Телефон: {{telephone}}

+

Почта: {{email}}