Permalink
Browse files

feat: add support of data-router-ignore attribute

Add data attribute because it can be dynamically controlled through a binding like `<a data-router-ignore.bind="condition || null"></a>`. This only works on data attribute, not normal attribute. Note `|| null` is required as dataAttributeAccessor only removes the attribute when value is null or undefined.
  • Loading branch information...
huochunpeng committed Jan 8, 2019
1 parent ea69690 commit 0d8f7a0611f5e479888cd9d7d5b1fbcfcc657370
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/link-handler.js
@@ -92,7 +92,7 @@ export class DefaultLinkHandler extends LinkHandler {
return info;
}

if (target.hasAttribute('download') || target.hasAttribute('router-ignore')) {
if (target.hasAttribute('download') || target.hasAttribute('router-ignore') || target.hasAttribute('data-router-ignore')) {
return info;
}

0 comments on commit 0d8f7a0

Please sign in to comment.