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

Commit c8e09c8

Browse files
docs($interpolate): add known issue about custom interpolation symbols
Closes #14610 Closes #6493
1 parent ab247d6 commit c8e09c8

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/ng/interpolate.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,25 @@ function $InterpolateProvider() {
221221
* symbol. For example, `{{ '}}' }}` will be incorrectly interpreted as `{{ ' }}` + `' }}`, i.e.
222222
* an interpolated expression consisting of a single-quote (`'`) and the `' }}` string.
223223
*
224+
* @knownIssue
225+
* All directives and components must use the standard `{{` `}}` interpolation symbols
226+
* in their templates. If you change the application interpolation symbols the {@link $compile}
227+
* service will attempt to denormalize the standard symbols to the custom symbols.
228+
* The denormalization process is not clever enough to know not to replace instances of the standard
229+
* symbols where they would not normally be treated as interpolation symbols. For example in the following
230+
* code snippet the closing braces of the literal object will get incorrectly denormalized:
231+
*
232+
* ```
233+
* <div data-context='{"context":{"id":3,"type":"page"}}">
234+
* ```
235+
*
236+
* The workaround is to ensure that such instances are separated by whitespace:
237+
* ```
238+
* <div data-context='{"context":{"id":3,"type":"page"} }">
239+
* ```
240+
*
241+
* See https://github.com/angular/angular.js/pull/14610#issuecomment-219401099 for more information.
242+
*
224243
* @param {string} text The text with markup to interpolate.
225244
* @param {boolean=} mustHaveExpression if set to true then the interpolation string must have
226245
* embedded expression in order to return an interpolation function. Strings with no

0 commit comments

Comments
 (0)