Commit c0fdfd97029df03f209de9d360be519a8054708b
1 parent
1b71fd76
this is copy right config services with new develop
Showing
3 changed files
with
24 additions
and
3 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | -AIA.controller("HomeController", ["$rootScope", "$scope", "Modules", "$log", "$location", "$timeout", "DataService", "AuthenticationService", "LoginConstants", "UserModules", "LoginMessageConstants", "AdminService", "$http", "AdminConstants", "UserTypeConstants", "AIAConstants", | ||
4 | -function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, AuthenticationService, LoginConstants, UserModules, LoginMessageConstants, AdminService, $http, AdminConstants, UserTypeConstants,AIAConstants) { | 3 | +AIA.controller("HomeController", ["$rootScope", "$scope", "Modules", "$log", "$location", "$timeout", "DataService", "AuthenticationService","ConfigurationService", "LoginConstants", "UserModules", "LoginMessageConstants", "AdminService", "$http", "AdminConstants", "UserTypeConstants", "AIAConstants", |
4 | +function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, AuthenticationService,ConfigurationService, LoginConstants, UserModules, LoginMessageConstants, AdminService, $http, AdminConstants, UserTypeConstants,AIAConstants) { | ||
5 | 5 | ||
6 | //$scope.pageToOpen = { | 6 | //$scope.pageToOpen = { |
7 | // name: 'MainMenu' | 7 | // name: 'MainMenu' |
@@ -176,7 +176,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A | @@ -176,7 +176,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A | ||
176 | } | 176 | } |
177 | $rootScope.getConfigurationValues = function () | 177 | $rootScope.getConfigurationValues = function () |
178 | { | 178 | { |
179 | - AuthenticationService.getCofigValue() | 179 | + ConfigurationService.getCofigValue() |
180 | .then( | 180 | .then( |
181 | function (configresult) { | 181 | function (configresult) { |
182 | $rootScope.current_year = configresult; | 182 | $rootScope.current_year = configresult; |
400-SOURCECODE/AIAHTML5.Web/app/services/ConfigurationService.js
0 → 100644
1 | +AIA.factory('ConfigurationService', function ($http, $q, $rootScope) { | ||
2 | + return { | ||
3 | + getCofigValue: function () { | ||
4 | + var deferred = $q.defer(); | ||
5 | + $http({ | ||
6 | + method: 'GET', | ||
7 | + url: 'API/api/Configuration/GetConfigurationvalues' | ||
8 | + }).success(function (data, status, headers, config) { | ||
9 | + console.log('success' + data); | ||
10 | + deferred.resolve(data); | ||
11 | + }).error(function (data, status, headers, config) { | ||
12 | + console.log('error') | ||
13 | + deferred.reject(data); | ||
14 | + | ||
15 | + }); | ||
16 | + return deferred.promise; | ||
17 | + } | ||
18 | + | ||
19 | + } | ||
20 | +}); | ||
0 | \ No newline at end of file | 21 | \ No newline at end of file |
400-SOURCECODE/AIAHTML5.Web/index.html
@@ -1422,6 +1422,7 @@ | @@ -1422,6 +1422,7 @@ | ||
1422 | <script src="app/controllers/HomeController.js"></script> | 1422 | <script src="app/controllers/HomeController.js"></script> |
1423 | <script src="app/controllers/LinkController.js"></script> | 1423 | <script src="app/controllers/LinkController.js"></script> |
1424 | <script src="app/services/AuthenticationService.js"></script> | 1424 | <script src="app/services/AuthenticationService.js"></script> |
1425 | + <script src="app/services/ConfigurationService.js"></script> | ||
1425 | <script src="app/services/AdminService.js"></script> | 1426 | <script src="app/services/AdminService.js"></script> |
1426 | <script src="app/controllers/TileViewListController.js"></script> | 1427 | <script src="app/controllers/TileViewListController.js"></script> |
1427 | 1428 |