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

docs(ngBindHtml): Added important info to comment #9400

Closed
wants to merge 1 commit into from

Conversation

tommyangelo
Copy link
Contributor

Added comment. It doesn't say you need to include angular-sanitize.js otherwise ngSanitize will cause an error!

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
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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)

Copy link
Contributor Author

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.

@mary-poppins
Copy link

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.
PS2: If you are a Googler, please sign the CLA as well to simplify the CLA verification process.

caitp pushed a commit that referenced this pull request Oct 6, 2014
…d on ngSanitize

Added comment. You need to include angular-sanitize.js otherwise you cant use ngSanitize!

Closes #9400
@caitp caitp closed this in da366f7 Oct 6, 2014
@caitp
Copy link
Contributor

caitp commented Oct 6, 2014

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.

bullgare pushed a commit to bullgare/angular.js that referenced this pull request Oct 9, 2014
…d on ngSanitize

Added comment. You need to include angular-sanitize.js otherwise you cant use ngSanitize!

Closes angular#9400
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants