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

docs(ngBindHtml): fix awkward wording #10111

Closed
wants to merge 1 commit into from
Closed

Conversation

trizko
Copy link
Contributor

@trizko trizko commented Nov 18, 2014

for issue #10097

changes:

  • @ngdoc directive
  • @name ngBindHtml
    *
  • @description
  • Creates a binding that will innerHTML the result of evaluating the expression into the current
  • 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). In order to use {@link ngSanitize} in your module's dependencies, you need to
  • include "angular-sanitize.js" in your application.

to this:
/**

  • @ngdoc directive
  • @name ngBindHtml
    *
  • @description
  • The ngBindHtml attribute tells Angular to replace the inner HTML content of the specified HTML
  • element with the value of a given expression, and to update the inner HTML content when the value
  • of that expression changes 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). In order to use {@link ngSanitize} in your module's dependencies,
  • you need to include "angular-sanitize.js" in your application.

changes: 
 * @ngdoc directive
 * @name ngBindHtml
 *
 * @description
 * Creates a binding that will innerHTML the result of evaluating the `expression` into the current
 * 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). In order to use {@link ngSanitize} in your module's dependencies, you need to
 * include "angular-sanitize.js" in your application.

to this:
/**
 * @ngdoc directive
 * @name ngBindHtml
 *
 * @description
 * The ngBindHtml attribute tells Angular to replace the inner HTML content of the specified HTML 
 * element with the value of a given expression, and to update the inner HTML content when the value 
 * of that expression changes 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). In order to use {@link ngSanitize} in your module's dependencies, 
 * you need to include "angular-sanitize.js" in your application.
@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.

@trizko
Copy link
Contributor Author

trizko commented Nov 18, 2014

I just signed the CLA

@thinkingmedia
Copy link
Contributor

The ngBindHtml attribute tells Angular to replace the inner HTML content of the specified HTML element with the value of a given expression

I don't like this wording. It implies that ngBindHtml is not a directive but an attribute flag that has meaning for a service called Angular. It also implies that Angular will do the replacement.

ngBindHtml is a directive that performs this task and the description should state that.

I think something like this would be better.

Evaluates the expression and inserts the resulting HTML into the element in a secure way.

@trizko
Copy link
Contributor Author

trizko commented Nov 19, 2014

Created new commit #10129

@petebacondarwin
Copy link
Contributor

Closing in favour of #10129

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.

4 participants