-
Notifications
You must be signed in to change notification settings - Fork 2
Associating a route to a page
A route is a relative URL (or a URL pattern - here for more information) that when matched will fire the navigation process for the page associated with it.
Type this line in the system console:
yo koco:route
The generator will ask for:
-
What is the pattern of the route:
press enter to select default (root of the app - / )
-
To which page is this route attached:
type home and press enter
Note: home being the name of the page we created previously.
-
What's the default page title for this route: The title will be part of the page configuration, and the value will be passed along to the "view model" if there is no title specified for the page.
type home and press enter
This will register the home route associated with the home page in the "components.js" file.
Make sure that the page is accessible by typing this in the system console (terminal/command line tool) inside your koco project folder:
gulp --open
A page with the title "Home" should appear.