Learning Angular for .NET Developers
上QQ阅读APP看书,第一时间看更新

Interpolation binding

Interpolation is one of the main features of Angular. You can interpolate any property value or expression to the content of any HTML element, such as div and li. You can achieve this with the help of double-curly braces, {{and}}, as shown in the following line of code:

<div>Hello, {{authorName}}!</div>

Here, we interpolate authorName to the content of the div tag. This is a one-way binding where the data flows from the component property or method to the template.