WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

AppML How To


The most effective method to assemble an AppML Application in 2 simple steps.


1. Make a Page Using HTML and CSS

HTML

<!DOCTYPE html>
<html lang="en-US">
<link rel="stylesheet" href="style.css">
<title>Customers</title>
<body>

<h1>Customers</h1>

<table>
<tr>
  <th>Customer</th>
  <th>City</th>
  <th>Country</th>
</tr>
<tr>
  <td>{{CustomerName}}</td>
  <td>{{City}}</td>
  <td>{{Country}}</td>
</tr>
</table>

</body>
</html>
The {{ }} brackets are placeholders for AppML data.

CSS

body {
    textual style: 14px Verdana, sans-serif;
}
h1 {
    shading: #996600;
}
table {
    width: 100%;
    outskirt breakdown: collapse;
}
th, td {
    outskirt: 1px strong grey;
    cushioning: 5px;
    content adjust: left;
}
table tr:nth-child(odd) {
    foundation shading: #f1f1f1;
}
/th>

2. Include AppML

Use AppML to add information to your page:

Example

<!DOCTYPE html>
<html lang="en-US">
<title>Customers</title>
<link rel="stylesheet" href="style.css">
<script src="http://www.welookups.com/appml/2.0.3/appml.js"></script>
<body>

<h1>Customers</h1>

<table appml-data="customers.js">
<tr>
  <th>Customer</th>
  <th>City</th>
  <th>Country</th>
</tr>
<tr appml-repeat="records">
  <td>{{CustomerName}}</td>
  <td>{{City}}</td>
  <td>{{Country}}</td>
</tr>
</table>

</body>
</html>

AppML Explained:

<script src="http://www.welookups.com/appml/2.0.3/appml.js"> adds AppML to your page.

appml-data="customers.js" associates AppML information (customers.js) to a HTML element (<table>).

In this case we have utilized a JSON record: customers.js

appml-repeat="records" rehashes a HTML component (<tr>) for every thing (records) in an information object.

The {{ }} brackets are placeholders for AppML data.