javascript - How could i include one tempate in another with html? -


i have code this:

<script id="innertemplate" type="text/template">   hello world </script> 

and code this:

<script id="outertemplate" type="text/template">   name john!   <p>      /*here want include code of innertemplate*/   </p> </script> 

does sombody know how it? thanks!

you can try that:

<script id="innertemplate" type="text/ng-template">   hello world </script>   <script id="outertemplate" type="text/ng-template">   name john!   <p ng-include="'innertemplate'"></p> </script>  <div ng-include="'outertemplate'"></div> 

http://plnkr.co/edit/vmjhmzornqhpxyao7e9z


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -