Dinamically generate views for CORE Models
Change-Id: Ib1d042f366f916c2ba8513ee62014e7256ceb53d
diff --git a/src/app/core/services/navigation.ts b/src/app/core/services/navigation.ts
new file mode 100644
index 0000000..8cb3b66
--- /dev/null
+++ b/src/app/core/services/navigation.ts
@@ -0,0 +1,31 @@
+export interface IXosNavigationRoute {
+ label: string;
+ state?: string;
+ url?: string;
+}
+
+export interface IXosNavigationService {
+ query(): IXosNavigationRoute[];
+ add(route: IXosNavigationRoute): void;
+}
+
+export class NavigationService {
+ private routes: IXosNavigationRoute[];
+
+ constructor() {
+ this.routes = [
+ {
+ label: 'Home',
+ state: 'xos.dashboard'
+ }
+ ];
+ }
+
+ query() {
+ return this.routes;
+ }
+
+ add(route: IXosNavigationRoute) {
+ this.routes.push(route);
+ }
+}