Skip to content
Permalink
Browse files

docs($interpolate): add known issue about custom interpolation symbols

Closes #14610
Closes #6493
  • Loading branch information
petebacondarwin committed May 23, 2016
1 parent ab247d6 commit c8e09c8a40540856c189532044ed10c1708d6be1
Showing with 19 additions and 0 deletions.
  1. +19 −0 src/ng/interpolate.js
@@ -221,6 +221,25 @@ function $InterpolateProvider() {
* symbol. For example, `{{ '}}' }}` will be incorrectly interpreted as `{{ ' }}` + `' }}`, i.e.
* an interpolated expression consisting of a single-quote (`'`) and the `' }}` string.
*
* @knownIssue
* All directives and components must use the standard `{{` `}}` interpolation symbols
* in their templates. If you change the application interpolation symbols the {@link $compile}
* service will attempt to denormalize the standard symbols to the custom symbols.
* The denormalization process is not clever enough to know not to replace instances of the standard
* symbols where they would not normally be treated as interpolation symbols. For example in the following
* code snippet the closing braces of the literal object will get incorrectly denormalized:
*
* ```
* <div data-context='{"context":{"id":3,"type":"page"}}">
* ```
*
* The workaround is to ensure that such instances are separated by whitespace:
* ```
* <div data-context='{"context":{"id":3,"type":"page"} }">
* ```
*
* See https://github.com/angular/angular.js/pull/14610#issuecomment-219401099 for more information.
*
* @param {string} text The text with markup to interpolate.
* @param {boolean=} mustHaveExpression if set to true then the interpolation string must have
* embedded expression in order to return an interpolation function. Strings with no

0 comments on commit c8e09c8

Please sign in to comment.
You can’t perform that action at this time.