Permalink
Browse files
docs($interpolate): add known issue about custom interpolation symbols
- Loading branch information
Showing
with
19 additions
and
0 deletions.
-
+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 |
|
|
|