script (directive)

Improve this Doc View Source script

  1. directive in module ng

Load the content of a <script> element into $templateCache, so that the template can be used by ngInclude, ngView, or directives. The type of the <script> element must be specified as text/ng-template, and a cache name for the template must be assigned through the element's id, which can then be used as a directive's templateUrl.

Directive Info

  • This directive executes at priority level 0.

Usage

  • as element:
    <script
      type=""
      id="">
    ...
    </script>

Arguments

Param Type Details
type string

Must be set to 'text/ng-template'.

id string

Cache name of the template.

© 2010–2016 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.3.20/docs/api/ng/directive/script

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部