This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change 55 * @name ngInit
66 * @restrict AC
77 * @priority 450
8+ * @element ANY
9+ *
10+ * @param {expression } ngInit {@link guide/expression Expression } to eval.
811 *
912 * @description
1013 * The `ngInit` directive allows you to evaluate an expression in the
1114 * current scope.
1215 *
1316 * <div class="alert alert-danger">
1417 * This directive can be abused to add unnecessary amounts of logic into your templates.
15- * There are only a few appropriate uses of `ngInit`, such as for aliasing special properties of
16- * {@link ng.directive:ngRepeat `ngRepeat`}, as seen in the demo below; and for injecting data via
17- * server side scripting. Besides these few cases, you should use {@link guide/controller controllers}
18- * rather than `ngInit` to initialize values on a scope.
18+ * There are only a few appropriate uses of `ngInit`:
19+ * <ul>
20+ * <li>aliasing special properties of {@link ng.directive:ngRepeat `ngRepeat`},
21+ * as seen in the demo below.</li>
22+ * <li>initializing data during development, or for examples, as seen throughout these docs.</li>
23+ * <li>injecting data via server side scripting.</li>
24+ * </ul>
25+ *
26+ * Besides these few cases, you should use {@link guide/component Components} or
27+ * {@link guide/controller Controllers} rather than `ngInit` to initialize values on a scope.
1928 * </div>
2029 *
2130 * <div class="alert alert-warning">
2635 * </pre>
2736 * </div>
2837 *
29- * @priority 450
30- *
31- * @element ANY
32- * @param {expression } ngInit {@link guide/expression Expression } to eval.
33- *
3438 * @example
3539 <example module="initExample" name="ng-init">
3640 <file name="index.html">
You can’t perform that action at this time.
0 commit comments