EVOLUTION-MANAGER
Edit File: script.html
<a href='https://github.com/angular/angular.js/edit/v1.3.x/src/ng/directive/script.js?message=docs(script)%3A%20describe%20your%20change...#L3' class='improve-docs btn btn-primary'><i class="glyphicon glyphicon-edit"> </i>Improve this Doc</a> <a href='https://github.com/angular/angular.js/tree/v1.3.9/src/ng/directive/script.js#L3' class='view-source pull-right btn btn-primary'> <i class="glyphicon glyphicon-zoom-in"> </i>View Source </a> <header class="api-profile-header"> <h1 class="api-profile-header-heading">script</h1> <ol class="api-profile-header-structure naked-list step-list"> <li> - directive in module <a href="api/ng">ng</a> </li> </ol> </header> <div class="api-profile-description"> <p>Load the content of a <code><script></code> element into <a href="api/ng/service/$templateCache"><code>$templateCache</code></a>, so that the template can be used by <a href="api/ng/directive/ngInclude"><code>ngInclude</code></a>, <a href="api/ngRoute/directive/ngView"><code>ngView</code></a>, or <a href="guide/directive">directives</a>. The type of the <code><script></code> element must be specified as <code>text/ng-template</code>, and a cache name for the template must be assigned through the element's <code>id</code>, which can then be used as a directive's <code>templateUrl</code>.</p> </div> <div> <h2>Directive Info</h2> <ul> <li>This directive executes at priority level 0.</li> </ul> <h2 id="usage">Usage</h2> <div class="usage"> <ul> <li>as element: <pre><code><script type="" id=""> ... </script></code></pre> </li> </div> <section class="api-section"> <h3>Arguments</h3> <table class="variables-matrix input-arguments"> <thead> <tr> <th>Param</th> <th>Type</th> <th>Details</th> </tr> </thead> <tbody> <tr> <td> type </td> <td> <a href="" class="label type-hint type-hint-string">string</a> </td> <td> <p>Must be set to <code>'text/ng-template'</code>.</p> </td> </tr> <tr> <td> id </td> <td> <a href="" class="label type-hint type-hint-string">string</a> </td> <td> <p>Cache name of the template.</p> </td> </tr> </tbody> </table> </section> <h2 id="example">Example</h2><p> <div> <a ng-click="openPlunkr('examples/example-example94')" class="btn pull-right"> <i class="glyphicon glyphicon-edit"> </i> Edit in Plunker</a> <div class="runnable-example" path="examples/example-example94"> <div class="runnable-example-file" name="index.html" language="html" type="html"> <pre><code><script type="text/ng-template" id="/tpl.html"> Content of the template. </script> <a ng-click="currentTpl='/tpl.html'" id="tpl-link">Load inlined template</a> <div id="tpl-content" ng-include src="currentTpl"></div></code></pre> </div> <div class="runnable-example-file" name="protractor.js" type="protractor" language="js"> <pre><code>it('should load template defined inside script tag', function() { element(by.css('#tpl-link')).click(); expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/); });</code></pre> </div> <iframe class="runnable-example-frame" src="examples/example-example94/index.html" name="example-example94"></iframe> </div> </div> </p> </div>