From ef73aa8c6f05b213d4ddb6b54126abc0302f7c59 Mon Sep 17 00:00:00 2001 From: greatdevaks Date: Fri, 15 Jul 2016 19:33:20 +0530 Subject: [PATCH] Update index.md Updated: How to add icon; Corrected: How to show option in sidebar; --- .../articles/013-create-new-page/index.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/contents/articles/013-create-new-page/index.md b/docs/contents/articles/013-create-new-page/index.md index 104d016..28871cd 100644 --- a/docs/contents/articles/013-create-new-page/index.md +++ b/docs/contents/articles/013-create-new-page/index.md @@ -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.