Reputation: 29
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
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