In Angular 1.x I can do the following to create a link which does basically nothing:
My Link
But the same tag
That will be same, it doesn't have anything related to angular2
. It is simple html tag.
Basically a
(anchor) tag will be rendered by HTML parser.
Edit
You can disable that href
by having javascript:void(0)
on it so nothing will happen on it. (But its hack). I know Angular 1 provided this functionality out of the box which isn't seems correct to me now.
Test
Plunkr
Other way around could be using, routerLink
directive with passing ""
value which will eventually generate blank href=""
Click me