From 010d9b6853a9d2718b095e4c017c9bd5f135e0b0 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Wed, 9 Sep 2015 13:14:58 +0100 Subject: [PATCH] docs(ngInit): relaxed the warning notice --- src/ng/directive/ngInit.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/ng/directive/ngInit.js b/src/ng/directive/ngInit.js index 37fc51f3d7f9..9f6ef1978a86 100644 --- a/src/ng/directive/ngInit.js +++ b/src/ng/directive/ngInit.js @@ -10,16 +10,18 @@ * current scope. * *
- * The only appropriate use of `ngInit` is for aliasing special properties of - * {@link ng.directive:ngRepeat `ngRepeat`}, as seen in the demo below. Besides this case, you - * should use {@link guide/controller controllers} rather than `ngInit` - * to initialize values on a scope. + * This directive can be abused to add unnecesary amounts of logic into your templates. + * There are only a few appropriate uses of `ngInit`, such as for aliasing special properties of + * {@link ng.directive:ngRepeat `ngRepeat`}, as seen in the demo below; and for injecting data via + * server side scripting. Besides these few cases, you should use {@link guide/controller controllers} + * rather than `ngInit` to initialize values on a scope. *
+ * *
- * **Note**: If you have assignment in `ngInit` along with {@link ng.$filter `$filter`}, make - * sure you have parenthesis for correct precedence: + * **Note**: If you have assignment in `ngInit` along with a {@link ng.$filter `filter`}, make + * sure you have parentheses to ensure correct operator precedence: *
- * `
` + * `
` *
*
*