anas mk
anas mk

Reputation: 29

the Difference between [routerLink] and routerLink

what is the difference between [routerLink] and routerLink in angular routing ? and what is the benifits for each one and what I should use

know the difference

Upvotes: 1

Views: 152

Answers (1)

Garuno
Garuno

Reputation: 2200

From the docs:

The brackets, [], cause Angular to evaluate the right-hand side of the assignment as a dynamic expression. Without the brackets, Angular treats the right-hand side as a string literal and sets the property to that static value.

Upvotes: 4

Related Questions