AppML HTML inclut
Avec AppML, vous pouvez inclure du HTML dans du HTML.
Inclure HTML dans HTML
Un bon exemple consiste à inclure un pied de page HTML standard dans toutes vos pages HTML.
Voici un exemple de fichier contenant un pied de page standard :
inc_footer.htm
<hr style="margin-top:10px;">
<p style="font-size:11px">2016© W3Schools. All rights reserved.</p>
<hr>
Dans cet exemple, l'attribut appml-include-html est utilisé pour inclure le fichier "inc_footer.htm" :
Exemple
<!DOCTYPE html>
<html lang="en-US">
<title>Customers</title>
<link rel="stylesheet" href="style.css">
<script src="https://www.w3schools.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>
<div appml-include-html="inc_footer.htm"></div>
</body>
</html>