Comparing version 16.0.0 to 16.0.1
@@ -9,3 +9,3 @@ import { BehaviorSubject } from 'rxjs'; | ||
navbarOffset: number; | ||
defaultRelAttr: string; | ||
defaultRelAttr?: string; | ||
defaultTargetAttr: string; | ||
@@ -12,0 +12,0 @@ private _actualAnchor; |
{ | ||
"name": "ngx-href", | ||
"version": "16.0.0", | ||
"version": "16.0.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "author": "Raphael Balet", |
@@ -9,2 +9,3 @@ # @ngx-href [![npm version](https://img.shields.io/npm/v/ngx-href.svg)](https://www.npmjs.com/package/ngx-href) | ||
3. Automatically append `rel="nooepener"` & `target="_blank"` to external link [if wished so](#installation) | ||
4. Support using `href` with the html `button` [attribute](#directive) | ||
@@ -39,7 +40,7 @@ - [@ngx-href ](#ngx-href-) | ||
/** Default | ||
* behavior="smooth" | ||
* defaultOffset="30" | ||
* navbarOffset="60" | ||
* rel="noopener" | ||
* target="_blank" | ||
* behavior="auto" | ||
* defaultOffset="0" | ||
* navbarOffset="0" | ||
* rel=undefined | ||
* target="_self" | ||
**/ | ||
@@ -50,7 +51,7 @@ ngxHrefModule.forRoot({}), | ||
ngxHrefModule.forRoot({ | ||
behavior:"instant", | ||
behavior:"smooth", | ||
defaultOffset:"30", | ||
navbarOffset:"60", | ||
rel:"noopener nofollow", | ||
target:"_self", | ||
target:"_blank", | ||
}), | ||
@@ -65,3 +66,3 @@ ], | ||
### Behavior | ||
**Default:** `"smooth"` | ||
**Default:** `"auto"` | ||
**Accepted value:** `ScrollBehavior` // ("auto" | "instant" | "smooth") | ||
@@ -77,3 +78,3 @@ | ||
**Default:** `30` | ||
**Default:** `0` | ||
**Accepted value:** `number` | ||
@@ -85,3 +86,3 @@ Together with the `navbarOffset` will be the total offset for the scroll. | ||
**Default:** `60` | ||
**Default:** `0` | ||
**Accepted value:** `number` | ||
@@ -113,3 +114,3 @@ Together with the `defaultOffset` will be the total offset for the scroll. | ||
### Rel attribute | ||
**Default:** `"noopener"` | ||
**Default:** `undefined` | ||
**Accepted value:** [string](https://developer.mozilla.org/fr/docs/Web/HTML/Attributes/rel) | ||
@@ -123,3 +124,3 @@ | ||
### Target attribute | ||
**Default:** `"_blank"` | ||
**Default:** `"_self"` | ||
**Accepted value:** [string](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target) | ||
@@ -129,3 +130,3 @@ | ||
```html | ||
<a href="https://my-external-url.com" target="_self"> | ||
<a href="https://my-external-url.com" target="_blank"> | ||
``` | ||
@@ -157,2 +158,8 @@ | ||
<!-- Or with a button --> | ||
<button href="/angular/router/link"> | ||
My internal link | ||
</button> | ||
<!-- External link --> | ||
@@ -159,0 +166,0 @@ <a href="https://external-url.com"> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
52876
195