Routing is a standard part of any web application and we will look at using a single centralized place with the Navigation object from WinJS to route our navigation calls. Start by understanding how to request that a page be rendered and then loaded into the DOM.
- [Voiceover] We have one page object…fully defined, we have a class associated to it…for the homepage, we have a UI in the homepage,…so now we need to load it.…In order to load it, we need to use WinJS.navigation.…So let's go back to our default.html,…and in our default.html, let's remove this…div of the homepage, we already put this…UI back into the home.html, let's get rid of it,…and let's just have a div that's gonna act…as a holder, so let's give it the ID of a holder.…
And this is just gonna be an empty div.…It's just gonna be something we can…load into or unload a page from.…Next thing that we need to do is we're…gonna go into the default.js, and we need to…declare a reference to that navigation object.…Now that we have a reference to the…navigation object, we're gonna want to…listen to one of the events of navigating,…so that we can capture when anyone's…made a request to navigate.…The navigation object works a lot like…routers in other frameworks such as…Angular or Backbone, and so you want to…rout your calls through it, you wanna make…
Watch to gain an understanding of the Universal Windows Platform and the application life cycle. Learn to create adaptive layouts with WinJS controls. Discover how to store and share data, capture a variety of input, and explore the unified Microsoft-specific APIs: Windows Core and Geolocation. Stacey Mulcahy, a Windows evangelist, provides developers with everything they need to start building Universal Windows apps and break into cross-device development.
- Setting up your development environment
- Coding in WinJS
- Creating page objects
- Animating page transitions
- Implementing responsive design principles and UI patterns
- Working with layout controls
- Using APIs: Windows Core and Geolocation
- Saving and reading data
Skill Level Beginner
1. Getting Started with Universal Windows Applications
3. Layouts and Controls
4. Utilizing APIs
5. Managing Data and Storage
Next steps1m 56s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.