-
Notifications
You must be signed in to change notification settings - Fork 27.4k
docs: ngSanitize is out ng core at AngularJS 1.2.21 #8519
Conversation
well, this isn't quite true --- you just need the value to be trusted (which the $sce api lets you do). I would rather we "suggest" that you include ngSanitize, because it's simpler. IIRC we already do actually say this somewhere in the docs, but I can't recall where. |
@caitp, how about now? I added a mention to use |
@@ -765,6 +763,11 @@ of `$sce.trustAsHtml(string)`. When bound to a plain string, the string is sanit | |||
module is not loaded) and the bound expression evaluates to a value that is not trusted an | |||
exception is thrown. | |||
|
|||
When using this directive you can either include `ngSanitize` in your module's dependencis (See the | |||
example at the [ngBindHtml](https://code.angularjs.org/1.2.21/docs/api/ng/directive/ngBindHtml) reference) |
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.
Don't link to a specific version of the doc (use the default revision like you used below)
Done! |
@@ -765,6 +763,11 @@ of `$sce.trustAsHtml(string)`. When bound to a plain string, the string is sanit | |||
module is not loaded) and the bound expression evaluates to a value that is not trusted an | |||
exception is thrown. | |||
|
|||
When using this directive you can either include `ngSanitize` in your module's dependencis (See the | |||
example at the [ngBindHtml](https://docs.angularjs.org/api/ng/directive/ngBindHtml) reference) |
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 think the links can and should be {@link ngBindHtml}
and {@link $sce}. But please check by running grunt docs
before changing
yeah petes right. For some reason I thought this was one of the markdown files in the root of the tree, but it's processed markdown so we use dgeni's link tag instead |
Other than that it LGTM |
When using ngBindHTML directive, either ngSanitize or $sce must be used or this will end in a non-trusted value error.
Done. Reviewed with |
the links look okay to me, I'm gonna merge it. @matsko the CSS for links looks really kinda bad though, they're really hard to identify as clickable :( |
When using ngBindHTML directive, either ngSanitize or $sce must be used or this will end in a non-trusted value error. Closes #8519
@petebacondarwin / @juliemr are the v1.2.x failures flakes, or did something get checked in that broke them? they've been failing pretty consistently since I checked in this patch |
It seems weird. I would say flake since the changes were minimal but the On 8 August 2014 05:54, Caitlin Potter [email protected] wrote:
|
i don't think the failures are caused by this commit, but i expect they're legitimate |
Hah! first commit into AngularJS and I break it ;D Just kidding. Let me know if I can help debugging what's broken. |
When using ngBindHTML directive, ngSanitize module must be added as a dependency.
Not doing so results in the following error:
You can see that the API reference for ngBindHTML includes the module below: