Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 1c045f1

Browse files
Gias Kay LeeIgorMinar
Gias Kay Lee
authored andcommitted
docs(script): add more detailed information
Closes #5671 Closes #5676
1 parent 95e1b2d commit 1c045f1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/ng/directive/script.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@
66
* @restrict E
77
*
88
* @description
9-
* Load content of a script tag, with type `text/ng-template`, into `$templateCache`, so that the
10-
* template can be used by `ngInclude`, `ngView` or directive templates.
9+
* Load the content of a `<script>` element into {@link api/ng.$templateCache `$templateCache`}, so that the
10+
* template can be used by {@link api/ng.directive:ngInclude `ngInclude`},
11+
* {@link api/ngRoute.directive:ngView `ngView`}, or {@link guide/directive directives}. The type of the
12+
* `<script>` element must be specified as `text/ng-template`, and a cache name for the template must be
13+
* assigned through the element's `id`, which can then be used as a directive's `templateUrl`.
1114
*
12-
* @param {'text/ng-template'} type must be set to `'text/ng-template'`
15+
* @param {'text/ng-template'} type Must be set to `'text/ng-template'`.
16+
* @param {string} id Cache name of the template.
1317
*
1418
* @example
1519
<doc:example>

0 commit comments

Comments
 (0)