AppML HTML include


Con AppML puoi includere HTML in HTML.


Incluso HTML in HTML

Un buon esempio di ciò è includere un piè di pagina HTML standard in tutte le tue pagine HTML.

Questo è un esempio di un file contenente un piè di pagina standard:

inc_footer.htm

<hr style="margin-top:10px;">
<p style="font-size:11px">2016&copy; W3Schools. All rights reserved.</p>
<hr>

In questo esempio l'attributo appml-include-html viene utilizzato per includere il file "inc_footer.htm":

Esempio

<!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>