Pages

Wednesday 22 August 2012

Windows 8 and HTML Part 4: First Taste of WinJS

Windows 8 and HTML Part 1: Simple Example

Let’s switch back to a WinJS application and take a look at what happens when a page is loaded.  Open package.appxmanifest and switch the Start Page back to default.html.

If you remember from Part 1, we created this application as a single-page style application.  This means that default.html gets loaded once, and different pieces of HTML content are then loaded “into” default.html for rendering and execution.  If we look at default.html, we see two important things.

Windows 8 and HTML Part 4: First Taste of WinJS First, we see that default.html loads the core script files for the WinJS framework and then the default.js script file (where we put our code), and also navigator.js, which helps navigate from page to page (with page really being HTML content being loaded into default.html).  The second thing to notice is that default.html contains a single div that is marked as aPageControlNavigator control.  It is this div that serves as the content host for the rest of the content.

Read full article here

No comments:

Post a Comment

Web Informer Button