Framework7 Auto Compilation - Framework7

How to compile templates using Auto Compilation in Framework7?


In Template7 users can compile their templates automatically by specifying special attributes in a <script> tag.

Below code shows auto compilation layout:

Users can use below attributes for initializing auto compilation:

type="text/template7": This is used to tell Template7 to auto compile and it is the required script type.

id="myTemplate": Template will be accessible through id and it is the required template id.

For automatic compilation, user has to enable app initialization by passing the below parameter:

Template7.templates / myApp.templates

Automatically compiled templates can be accessed as properties of Template7.templates after initializing the app and it is also known as myApp.templates where myApp is an initialized instance of the app.

User can use following templates in the index.html file:

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

Framework7 Topics