Angular difference between ${ value } and {{ value }}

${someVar} is string interpolation from TS and is applied before the template is processed by angular. {{someVar}} is Angular template binding expression.


To complete what Günter said, the ${someVar} corresponds to the string interpolation feature of ES6. This can be used within strings defined between the charater ` (back-tick). This also allows to define string on several lines.

Here is a sample

let someVar = '10';
let someString = `The value of someVar is ${someVar}`;

It's something that can be used outside Angular2 with ES6.

See this link for more details: https://developers.google.com/web/updates/2015/01/ES6-Template-Strings.

Hope it helps you, Thierry

Tags:

Angular