javascript / beginner
Snippet
One-Way Property Binding
Property binding allows you to set the value of an HTML element's property to a variable in your component using square brackets.
snippet.js
1
<img [src]="userImageUrl" alt="Profile image">
angular
Breakdown
1
[src]="userImageUrl"
The square brackets indicate property binding, pushing data from the component to the element's 'src' property.