angular-smoothscroll
angular-smoothscroll copied to clipboard
opens in new tab when href has a value
a link with an href that has a value, and an unrecognised target attribute will open in a new tab.
Unrecognised values for the target attribute (HTML attribute) open in new tabs.
Directive could rather check if it, itself, has an attribute, and then fallback to href should there not be one. This allows one to override the href of an anchor, while allowing smoothscroll to fallback to how browsers work by default should the directive not be supplied an attribute.
<a href="#my-id" smooth-scroll="some-other-id">go to #some-other-id if js</a>
or
<a href="#my-id" smooth-scroll>go to #my-id</a>
+1
+1