-
Notifications
You must be signed in to change notification settings - Fork 27.4k
docs(ngBindHtml): Added important info to comment #9400
Conversation
Added comment. You need to include angular-sanitize.js otherwise you cant use ngSanitize!
@@ -145,7 +145,8 @@ var ngBindTemplateDirective = ['$interpolate', '$compile', function($interpolate | |||
* element in a secure way. By default, the innerHTML-ed content will be sanitized using the {@link | |||
* ngSanitize.$sanitize $sanitize} service. To utilize this functionality, ensure that `$sanitize` | |||
* is available, for example, by including {@link ngSanitize} in your module's dependencies (not in | |||
* core Angular.) You may also bypass sanitization for values you know are safe. To do so, bind to | |||
* core Angular). In order to use {@link ngSanitize} in your module's dependencies, you need to add "angular-sanitize.js" to your index.html. | |||
* You may also bypass sanitization for values you know are safe. To do so, bind to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this change is adding much --- the specific instructions are only helpful to people under a specific configuration, and the real instructions for this are laid out more clearly in the tutorial
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it would have helped me to make it run. There was no info about the
file, how should one know? I found out on stackoverflow and was pissed off
enough to make that change. So please let others know, what is a comment
then for?
Am 02.10.2014 22:15 schrieb "Caitlin Potter" [email protected]:
In src/ng/directive/ngBind.js:
@@ -145,7 +145,8 @@ var ngBindTemplateDirective = ['$interpolate', '$compile', function($interpolate
- element in a secure way. By default, the innerHTML-ed content will be sanitized using the {@link
- ngSanitize.$sanitize $sanitize} service. To utilize this functionality, ensure that
$sanitize
- is available, for example, by including {@link ngSanitize} in your module's dependencies (not in
- * core Angular.) You may also bypass sanitization for values you know are safe. To do so, bind to
- * core Angular). In order to use {@link ngSanitize} in your module's dependencies, you need to add "angular-sanitize.js" to your index.html.
- * You may also bypass sanitization for values you know are safe. To do so, bind to
I don't think this change is adding much --- the specific instructions are
only helpful to people under a specific configuration, and the real
instructions for this are laid out more clearly in the tutorial—
Reply to this email directly or view it on GitHub
https://github.com/angular/angular.js/pull/9400/files#r18364209.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, okay --- fair enough =) can we just change it slightly to simply explain that you need to include angular-sanitize.js
? (leave inde.html/requirejs/browserify configuration/whatever else as an exercise for the reader)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah sure, as long as there is some info for people. I probably needed like an hour to figure out how to print out html in ng-repeat, which shouldn't be a big deal imo. I'm a beginner, so couldn't understand why such a small thing was so hard to achieve.
I'm sorry, but I wasn't able to verify your Contributor License Agreement (CLA) signature. CLA signature is required for any code contributions to AngularJS. Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match. If you signed the CLA as a corporation, please let us know the company's name. Thanks a bunch! PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR. |
…d on ngSanitize Added comment. You need to include angular-sanitize.js otherwise you cant use ngSanitize! Closes #9400
I made some slight adjustments to your addition and checked it in --- particularly removed the reference to index.html and merely said "include {{the script}} in your application" --- also cleaned up the lines to look more elegant. |
…d on ngSanitize Added comment. You need to include angular-sanitize.js otherwise you cant use ngSanitize! Closes angular#9400
Added comment. It doesn't say you need to include angular-sanitize.js otherwise ngSanitize will cause an error!