angular interpolation with html code example
Example 1: angular property binding
// component.ts
@Component({
templateUrl: 'component.html',
selector: 'app-component',
})
export class Component {
name = 'Peter';
updateName() {
this.name = 'John';
}
}
Example 2: angular interpolation
<p>{{title}}</p>
<div><img src="{{itemImageUrl}}"></div>