Sunday, 12 April 2015

Chapter 8 - AppML

What We Will Do

In this chapter we will:
  • Use AppML to fetch and display data on a website

Put the following code inside the file:

customers.html

<!DOCTYPE html>
<html>
<head>
<title>Our Company</title>
<link href="site.css" rel="stylesheet">
<script src="http://www.w3schools.com/appml/2.0.1/appml.js"></script>
</head>
<body>

<nav id="nav01"></nav>

<div id="main">
<h1>Customers</h1>
<table appml-data="http://www.w3schools.com/website/customers.php">
  <tr>
    <th>Name</th>
    <th>City</th>
    <th>Country</th>
  </tr>
  <tr appml-repeat="records">
    <td>{{Name}}</td>
    <td>{{City}}</td>
    <td>{{Country}}</td>
    </tr>
</table>
<footer id="foot01"></footer>
</div>

<script src="script.js"></script>

</body>
</html>
The code above is much same as in the previous chapter.
Only this time the data is fetched and displayed with AppML.

Need help? Try KimmyJusTips!
 

No comments:

Post a Comment