Angular · Junior · Question 10 of 75

What is the difference between src="{{ url }}" and [src]="url"?

Explanation

[property]="expr" binds a DOM or component property to an expression of any type, e.g. [disabled]="isSaving". Interpolation in an attribute is shorthand for a string property binding.

Further reading

Problem with a question

Angular · Junior · question 10

Test yourself

Take the Angular · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz