angular-smoothscroll icon indicating copy to clipboard operation
angular-smoothscroll copied to clipboard

opens in new tab when href has a value

Open larrybotha opened this issue 10 years ago • 2 comments

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>

larrybotha avatar Aug 11 '14 09:08 larrybotha

+1

haydnhkim avatar Oct 27 '14 10:10 haydnhkim

+1

argia-andreas avatar Nov 24 '14 08:11 argia-andreas