Update index.md

Updated:
How to add icon;

Corrected:
How to show option in sidebar;
pull/118/head
greatdevaks 2016-07-15 19:33:20 +05:30 committed by GitHub
parent f89cdf0916
commit ef73aa8c6f
1 changed files with 14 additions and 1 deletions

View File

@ -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`.
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
(function () {
'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',
title: 'My New Page',
sidebarMeta: {
icon: 'ion-android-home', //as per your choice
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.