mirror of https://github.com/akveo/blur-admin
Update index.md
Updated: How to add icon; Corrected: How to show option in sidebar;pull/118/head
parent
f89cdf0916
commit
ef73aa8c6f
|
@ -40,7 +40,7 @@ This will allow you to easily switch off some pages in the future if needed.
|
||||||
|
|
||||||
3) Then let's create empty html file called `my-new-page.html` inside of `src/app/pages/myNewPage`.
|
3) Then let's create empty html file called `my-new-page.html` inside of `src/app/pages/myNewPage`.
|
||||||
|
|
||||||
4) Lastly let's create ui router state for this page. To do this we need to modify module.js file we created on step 2:
|
4) Now let's create ui router state for this page. To do this we need to modify module.js file we created on step 2:
|
||||||
```javascript
|
```javascript
|
||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -56,6 +56,7 @@ This will allow you to easily switch off some pages in the future if needed.
|
||||||
templateUrl: 'app/pages/myNewPage/my-new-page.html',
|
templateUrl: 'app/pages/myNewPage/my-new-page.html',
|
||||||
title: 'My New Page',
|
title: 'My New Page',
|
||||||
sidebarMeta: {
|
sidebarMeta: {
|
||||||
|
icon: 'ion-android-home', //as per your choice
|
||||||
order: 800,
|
order: 800,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -64,5 +65,17 @@ This will allow you to easily switch off some pages in the future if needed.
|
||||||
})();
|
})();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
5) Lastly go to `src/app/pages/pages.module.js` and add 'BlurAdmin.pages.myNewPage' as shown below:
|
||||||
|
```javascript
|
||||||
|
angular.module('BlurAdmin.pages', [
|
||||||
|
'ui.router',
|
||||||
|
|
||||||
|
'BlurAdmin.pages.dashboard',
|
||||||
|
...
|
||||||
|
...
|
||||||
|
'BlurAdmin.pages.myNewPage',
|
||||||
|
])
|
||||||
|
```
|
||||||
|
|
||||||
That's it! Your can now open your new page either from sidebar or through hash URL.
|
That's it! Your can now open your new page either from sidebar or through hash URL.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue