top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

In Angular(2/4/5), What is the difference between [routerLink] vs routerLink ?

0 votes
105 views
In Angular(2/4/5), What is the difference between [routerLink] vs routerLink ?
posted Jan 16, 2018 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

[routerLink] and routerLink are both used to link the routes from Html.
In [routerLink] we can provide the values dynamically whereas in routerLink we can't pass dynamic values.

[routerLink] Example

<a [routerLink] = [currentLink]>Back </a>

Component File

this.currentLink = 'home';

routerLink Example

<a routerLink = "home">Back </a>
answer Jan 24, 2018 by Manish Tiwari
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...