forked from DevExpress/devextreme-angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add navigation service and fix page components (DevExpress#4)
* Add navigation service and fix page components * Add type of navigation
- Loading branch information
1 parent
ba56bf8
commit 7a78420
Showing
7 changed files
with
72 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { TestBed, inject } from '@angular/core/testing'; | ||
|
||
import { NavigationService } from './navigation.service'; | ||
|
||
describe('NavigationService', () => { | ||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
providers: [NavigationService] | ||
}); | ||
}); | ||
|
||
it('should be created', inject([NavigationService], (service: NavigationService) => { | ||
expect(service).toBeTruthy(); | ||
})); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { Injectable } from '@angular/core'; | ||
|
||
export class Navigation { | ||
text: string; | ||
expanded?: boolean; | ||
icon?: string; | ||
path?: string; | ||
items?: any; | ||
} | ||
|
||
let navigationData: Navigation[] = [ | ||
{ | ||
"text": "Home", | ||
"expanded": true, | ||
"icon": "home", | ||
"items": [ | ||
{ | ||
"text": "Profile", | ||
"path": "profile" | ||
}, | ||
{ | ||
"text": "Settings", | ||
"path": "settings" | ||
} | ||
] | ||
}, | ||
{ | ||
"text": "About", | ||
"icon": "info", | ||
"path": "about" | ||
} | ||
] | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class NavigationService { | ||
getNavigationData() { | ||
return navigationData; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters