Creating App Templates
A template must have the isTemplate system attribute in the <aura:component> tag set to true. This informs the framework to allow restricted items, such as <script> tags, which aren't allowed in regular components.
A component with the isTemplate system attribute set to true can’t be used on a site page. To use a component on a site page, the isTemplate system attribute can’t be set to true.
For example, a sample app has a np:template template that extends aura:template. np:template looks like:
<aura:component isTemplate="true" extends="aura:template">
<aura:set attribute="title" value="My App"/>
...
</aura:component>
Note how the component extends aura:template and sets the title attribute using aura:set.
The app points at the custom template by setting the template system attribute in <aura:application>.
<aura:application template="np:template">
...
</aura:application>
A template can only extend a component or another template. A component or an application can't extend a template.