In our case, we wanted to represent curly braces in the placeholder, so they should appear inside the HTML attribute. We used this:
<input placeholder="{{ 'Hello {' + '{person.name}' + '}!' }}" ...>
As you can see, we create a line of three smaller lines to keep the braces separate.
'Hello {' + '{person.name}' + '}!'
This avoids the use of ng-non-bindable , so we can continue to use the ng- attributes ng- on the element.
joeytwiddle May 27 '16 at 2:30 a.m. 2016-05-27 02:30
source share