The routerLinkActive is an instruction to add the active class of CSS when an element routerlink is active. The routerLinkActive attribute, which is used to specify a CSS class that the element will be assigned to when the URL specified by the routerLink attribute matches the active route. Use the routerLinkActive attribute when a specific route is active for style an element. In the HTML we using like this
<a href="link">Text</a>
But this is not the best way in angular. Yes, this code is working in angular but this is not the best and professional way. routerlink is provided by angular to work with the internal system route. You cannot use routerlink for the link to the external website.routerlink is only work for internal links. Read More
Comments
Post a Comment