Moved config to ngConstant to mount that from outside the container
Change-Id: I23169cdeeae9034ea97e94089dcdbca3179bbb23
diff --git a/src/app/core/nav/nav.spec.ts b/src/app/core/nav/nav.spec.ts
index 28cd3e1..fafec7d 100644
--- a/src/app/core/nav/nav.spec.ts
+++ b/src/app/core/nav/nav.spec.ts
@@ -30,7 +30,8 @@
.module('xosNav', ['app/core/nav/nav.html', 'ui.router'])
.component('xosNav', xosNav)
.service('NavigationService', NavigationService)
- .value('AuthService', AuthMock);
+ .value('AuthService', AuthMock)
+ .value('StyleConfig', {});
angular.mock.module('xosNav');
});
diff --git a/src/app/core/nav/nav.ts b/src/app/core/nav/nav.ts
index 6c26635..c100c42 100644
--- a/src/app/core/nav/nav.ts
+++ b/src/app/core/nav/nav.ts
@@ -1,10 +1,10 @@
import './nav.scss';
import {IXosNavigationService, IXosNavigationRoute} from '../services/navigation';
-import {StyleConfig} from '../../config/style.config';
import {IXosAuthService} from '../../datasources/rest/auth.rest';
+import {IXosStyleConfig} from '../../../index';
class NavCtrl {
- static $inject = ['$scope', '$state', 'NavigationService', 'AuthService'];
+ static $inject = ['$scope', '$state', 'NavigationService', 'AuthService', 'StyleConfig'];
public routes: IXosNavigationRoute[];
public navSelected: string;
public appName: string;
@@ -14,7 +14,8 @@
private $scope: ng.IScope,
private $state: angular.ui.IStateService,
private navigationService: IXosNavigationService,
- private authService: IXosAuthService
+ private authService: IXosAuthService,
+ private StyleConfig: IXosStyleConfig
) {
// NOTE we'll need to have:
// - Base routes (defined from configuration based on BRAND)
@@ -24,8 +25,8 @@
this.$scope.$watch(() => this.navigationService.query(), (routes) => {
this.routes = routes;
});
- this.appName = StyleConfig.projectName;
- this.payoff = StyleConfig.payoff;
+ this.appName = this.StyleConfig.projectName;
+ this.payoff = this.StyleConfig.payoff;
}
activateRoute(route: IXosNavigationRoute) {