HTML and CSS Reference
In-Depth Information
required to safely coordinate access to data. This is like providing matches and gas but hiding
the fire extinguisher. You can use JavaScript promises to create rich parallel-enabled applica-
tions, but it requires care and skill.
The final step in applying my template is to add my ui.js le to default.html , as shown
in Listing 2-15.
Listing 2-15. Adding the ui.js File to default.html
<link href="/css/list.css" rel="stylesheet">
<link href="/css/default.css" rel="stylesheet">
<script src="/js/viewmodel.js"></script>
<script src="/js/ui.js"></script>
<script src="/js/default.js"></script>
As you can see, I have also defined a new stylesheet called list.css . The file con-
tains some simple CSS styles to format the list items and is included as part of the source code
download that accompanies this topic and that is available without charge from Apress.com.
Note
he WinJS.UI.processAll method sets the CSS display property to none so that the tem-
plate isn't visible to the user. You can see the result of using the template to populate the table
in Figure 2-4 .
Figure 2-4. Generating table rows using a template and a List object
I added some styles to default.css to control the appearance of the table. There is
nothing specific to Metro in these styles, and you can find the changes in the source code down-
load that accompanies this topic (available from Apress.com).
Note
 
Search WWH ::




Custom Search