Part-015
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
What you will learn: Creating Single Page Applications with ojModule and oj.router How to use this sample: 1. Open the sample. 2. Talk about adding 'header' and 'footer' modules and loading them in index.html: <header data-bind="ojModule: {name:'header'}"></header> <footer data-bind="ojModule: {name:'footer'}"></footer> 3. Look again at the index.html file and point out that a router handles loading of modules. Look at the two modules 'home' and 'people'. In index.html, talk about adding router configuration between the header and footer: <div data-bind="ojModule: { name: router.stateId()}"></div> Open main.js, talk about the code defining the router in the 'require' block. 4. Talk about the need to add a navigation component. Talk about needing an Oracle JET component to let the user control the router. Open 'header.js' and 'header.html' and talk about the ojNavigationList component.