From d6e7af1f76a4c2c0e50630a1617a504350d67381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Balet?= Date: Mon, 22 Apr 2024 22:04:36 +0200 Subject: [PATCH] docs(README): example --- README.md | 15 ++++++++++++--- .../src/app/first/first.component.html | 12 +++++------- projects/ngx-href/README.md | 15 ++++++++++++--- 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 4869d68..022af5a 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ npm install ngx-href Inside your `app.module.ts` file. ```typescript -import { ngxHrefModule, ngxHrefService } from 'ngx-href' +import { NgxHrefModule } from 'ngx-href' imports: [ /** Default @@ -37,10 +37,10 @@ import { ngxHrefModule, ngxHrefService } from 'ngx-href' * retryTimeout=undefined * target="_self" **/ - ngxHrefModule.forRoot({}), + NgxHrefModule.forRoot({}), // Or - ngxHrefModule.forRoot({ + NgxHrefModule.forRoot({ avoidSpam: true, behavior:"smooth", defaultOffset:"30", @@ -164,6 +164,15 @@ Normal use An external link + + + tel:+41791112233 + + + + + mailto:foobar@outlook.com + diff --git a/projects/ngx-href-tester/src/app/first/first.component.html b/projects/ngx-href-tester/src/app/first/first.component.html index f56df00..307843a 100644 --- a/projects/ngx-href-tester/src/app/first/first.component.html +++ b/projects/ngx-href-tester/src/app/first/first.component.html @@ -2,26 +2,24 @@

Page: 1

Internal link

- +

href="/home/second": Go to the second page (sibling)

- +

href="#scrollToMe"Scroll to the title

External link

DefaultTargetAttr: _blank

- +

href="https://...": Open the new page in a new page

target="_self"

- +

href="https://..." & target="_self": Open the new page in the current page @@ -30,7 +28,7 @@

target="_self"

avoidSpam

- tel:+41791112233 + tel:+41791112233

href="tel:...": Custom the href till hovering - Look at the DOM with your dev tool diff --git a/projects/ngx-href/README.md b/projects/ngx-href/README.md index 4869d68..022af5a 100644 --- a/projects/ngx-href/README.md +++ b/projects/ngx-href/README.md @@ -25,7 +25,7 @@ npm install ngx-href Inside your `app.module.ts` file. ```typescript -import { ngxHrefModule, ngxHrefService } from 'ngx-href' +import { NgxHrefModule } from 'ngx-href' imports: [ /** Default @@ -37,10 +37,10 @@ import { ngxHrefModule, ngxHrefService } from 'ngx-href' * retryTimeout=undefined * target="_self" **/ - ngxHrefModule.forRoot({}), + NgxHrefModule.forRoot({}), // Or - ngxHrefModule.forRoot({ + NgxHrefModule.forRoot({ avoidSpam: true, behavior:"smooth", defaultOffset:"30", @@ -164,6 +164,15 @@ Normal use An external link + + + tel:+41791112233 + + + + + mailto:foobar@outlook.com +