Added Side panel component
Change-Id: I6c10fc025c904262872b984a137c3252fd435374
diff --git a/src/app/core/nav/nav.html b/src/app/core/nav/nav.html
index a45d3c8..402d2fa 100644
--- a/src/app/core/nav/nav.html
+++ b/src/app/core/nav/nav.html
@@ -44,6 +44,7 @@
<a ng-click="vm.logout()" class="btn btn-accent btn-block btn-logout">Logout</a>
</div>
</div>
+ <!--<a ng-click="vm.togglePanel()" class="btn btn-success">Open XSP</a>-->
</li>
</ul>
</nav>
diff --git a/src/app/core/nav/nav.spec.ts b/src/app/core/nav/nav.spec.ts
index fafec7d..f443d91 100644
--- a/src/app/core/nav/nav.spec.ts
+++ b/src/app/core/nav/nav.spec.ts
@@ -31,7 +31,8 @@
.component('xosNav', xosNav)
.service('NavigationService', NavigationService)
.value('AuthService', AuthMock)
- .value('StyleConfig', {});
+ .value('StyleConfig', {})
+ .value('XosSidePanel', {});
angular.mock.module('xosNav');
});
diff --git a/src/app/core/nav/nav.ts b/src/app/core/nav/nav.ts
index c100c42..ec2d8b2 100644
--- a/src/app/core/nav/nav.ts
+++ b/src/app/core/nav/nav.ts
@@ -2,9 +2,10 @@
import {IXosNavigationService, IXosNavigationRoute} from '../services/navigation';
import {IXosAuthService} from '../../datasources/rest/auth.rest';
import {IXosStyleConfig} from '../../../index';
+import {IXosSidePanelService} from '../side-panel/side-panel.service';
class NavCtrl {
- static $inject = ['$scope', '$state', 'NavigationService', 'AuthService', 'StyleConfig'];
+ static $inject = ['$scope', '$state', 'NavigationService', 'AuthService', 'StyleConfig', 'XosSidePanel'];
public routes: IXosNavigationRoute[];
public navSelected: string;
public appName: string;
@@ -15,7 +16,8 @@
private $state: angular.ui.IStateService,
private navigationService: IXosNavigationService,
private authService: IXosAuthService,
- private StyleConfig: IXosStyleConfig
+ private StyleConfig: IXosStyleConfig,
+ private XosSidePanel: IXosSidePanelService
) {
// NOTE we'll need to have:
// - Base routes (defined from configuration based on BRAND)
@@ -56,6 +58,11 @@
}
}
+ // NOTE remove me
+ togglePanel() {
+ this.XosSidePanel.injectComponent('xosAlert', {config: {type: 'danger'}, show: true}, 'Sample message');
+ }
+
logout() {
this.authService.logout()
.then(() => {