Define a separate HTML fragment and use as a template. These templates can be loaded as pages in <ons-navigator>
, <ons-tabbar>
and <ons-splitter>
. They can also be used to generate dialogs. Since Onsen UI 2.4.0, the native <template>
element can be used instead of <ons-template>
for better performance and features. <ons-template>
is still supported for backward compatibility.
<ons-template id="foobar.html">
<ons-page>
Page content
</ons-page>
</ons-template>
<ons-navigator page="foobar.html"></ons-navigator>
Name | Description |
---|---|
template | Template content. This property can not be used with AngularJS bindings. |
If you have any questions, use our Community Forum or talk to us on Discord chat. The Onsen UI team and your peers in the community will work together to help solve your issues.
For bug reports and feature requests use our GitHub Issues page.