From 1203a49020a0d80fbc490151fc87b576e879c5ed Mon Sep 17 00:00:00 2001 From: liquidpele Date: Tue, 13 Feb 2018 20:29:53 -0500 Subject: [PATCH] Add missing last step to making a page Routing doesn't work unless you add the new page to the dependency list of the parent module. --- articles/013-create-new-page/index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/articles/013-create-new-page/index.html b/articles/013-create-new-page/index.html index 6b16f8f8a..c4d672359 100644 --- a/articles/013-create-new-page/index.html +++ b/articles/013-create-new-page/index.html @@ -78,7 +78,7 @@

Page creation example

})();

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:

(function () {
   'use strict';
 
@@ -100,6 +100,7 @@ 

Page creation example

})();
+

5) Lastly, add the page to the parent module. Edit the pages.module.js file and add our new module to the dependency list, as well as to the sidebar definition object (for instance, under the item for "404 Page").

That’s it! Your can now open your new page either from sidebar or through hash URL.

@@ -115,4 +116,4 @@

Page creation example

ga('send', 'pageview'); - \ No newline at end of file +