blob: 8cb3b66a1e119e65c892c21672851476885ac117 [file] [log] [blame]
Matteo Scandolof2c3ed62016-12-15 14:32:50 -08001export interface IXosNavigationRoute {
2 label: string;
3 state?: string;
4 url?: string;
5}
6
7export interface IXosNavigationService {
8 query(): IXosNavigationRoute[];
9 add(route: IXosNavigationRoute): void;
10}
11
12export class NavigationService {
13 private routes: IXosNavigationRoute[];
14
15 constructor() {
16 this.routes = [
17 {
18 label: 'Home',
19 state: 'xos.dashboard'
20 }
21 ];
22 }
23
24 query() {
25 return this.routes;
26 }
27
28 add(route: IXosNavigationRoute) {
29 this.routes.push(route);
30 }
31}