{"_id":"@bcodes/ngx-routerlink-delay","_rev":"5-6c9643e391686351c0c97446f6191bb7","name":"@bcodes/ngx-routerlink-delay","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"@bcodes/ngx-routerlink-delay","description":"Extension of the RouterLinkWithHref directive a[routerLink] with an additional @Input data binding for delaying navigation","version":"1.0.0","repository":{"type":"git","url":"git+https://github.com/briancodes/ngx-routerlink-delay.git"},"author":{"name":"briancodes"},"license":"MIT","private":false,"peerDependencies":{"@angular/core":">=5.2.0","@angular/common":">=5.2.0","@angular/router":">=5.2.0","rxjs":">=5.5.6"},"main":"bundles/bcodes-ngx-routerlink-delay.umd.js","module":"esm5/bcodes-ngx-routerlink-delay.js","es2015":"esm2015/bcodes-ngx-routerlink-delay.js","typings":"bcodes-ngx-routerlink-delay.d.ts","metadata":"bcodes-ngx-routerlink-delay.metadata.json","dependencies":{"tslib":"^1.7.1"},"bugs":{"url":"https://github.com/briancodes/ngx-routerlink-delay/issues"},"homepage":"https://github.com/briancodes/ngx-routerlink-delay#readme","_id":"@bcodes/ngx-routerlink-delay@1.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"bcodes","email":"briannpm2357@gmail.com"},"dist":{"integrity":"sha512-ayfzlOqs/vD+ZBZ+Dd6ocK2g5xGNiBrbf4ajQ/e6SKlCz9V+ndKRdxsUpNobrQf74H0xtGnFJbQKmFE7P3PpCA==","shasum":"c39f6d08151a322f1b538d04e394c9b007602f85","tarball":"https://registry.npmjs.org/@bcodes/ngx-routerlink-delay/-/ngx-routerlink-delay-1.0.0.tgz","fileCount":16,"unpackedSize":73559,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpEwZbZyYX8j9owbCAkoqo2ei7m7x5zYQAdbwQ+HozNQIhAKKajwTEOayVN0gHXPu1hdHwn0f3O18CfpV9Uja+9Oko"}]},"maintainers":[{"name":"bcodes","email":"briannpm2357@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngx-routerlink-delay_1.0.0_1520460549632_0.5408873582191875"},"_hasShrinkwrap":false},"1.0.1":{"name":"@bcodes/ngx-routerlink-delay","description":"Extension of the Angular RouterLinkWithHref directive a[routerLink] with an additional @Input data binding for delaying navigation","version":"1.0.1","repository":{"type":"git","url":"git+https://github.com/briancodes/ngx-routerlink-delay.git"},"author":{"name":"briancodes"},"license":"MIT","private":false,"peerDependencies":{"@angular/core":">=5.2.0","@angular/common":">=5.2.0","@angular/router":">=5.2.0","rxjs":">=5.5.6"},"keywords":["angular","routerlink","delay","timer"],"main":"bundles/bcodes-ngx-routerlink-delay.umd.js","module":"esm5/bcodes-ngx-routerlink-delay.js","es2015":"esm2015/bcodes-ngx-routerlink-delay.js","typings":"bcodes-ngx-routerlink-delay.d.ts","metadata":"bcodes-ngx-routerlink-delay.metadata.json","dependencies":{"tslib":"^1.7.1"},"bugs":{"url":"https://github.com/briancodes/ngx-routerlink-delay/issues"},"homepage":"https://github.com/briancodes/ngx-routerlink-delay#readme","_id":"@bcodes/ngx-routerlink-delay@1.0.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"bcodes","email":"briannpm2357@gmail.com"},"dist":{"integrity":"sha512-a81xadILPuXmOid1JrSpTSFvSGe111a7MZET8qfVGZeLXEtDbxlxk3nhhRc/NGbkCYRlsaod0Dsjp9J6yIn2JQ==","shasum":"8311b2853aebe11146c40a716c4f15f84d812cb4","tarball":"https://registry.npmjs.org/@bcodes/ngx-routerlink-delay/-/ngx-routerlink-delay-1.0.1.tgz","fileCount":16,"unpackedSize":73645,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC92Iu84gUP1CKnA0/yc2mfJ3fqouscM6Hw6+o4ZPuU2AiEAial25zWgIw1GA8gg/fnKngmWhQegYGhhf6ByTbR7fCs="}]},"maintainers":[{"name":"bcodes","email":"briannpm2357@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngx-routerlink-delay_1.0.1_1520462809924_0.16945485271291272"},"_hasShrinkwrap":false},"1.1.0":{"name":"@bcodes/ngx-routerlink-delay","description":"Extension of the Angular RouterLinkWithHref directive a[routerLink] with an additional @Input data binding for delaying navigation","version":"1.1.0","repository":{"type":"git","url":"git+https://github.com/briancodes/ngx-routerlink-delay.git"},"author":{"name":"briancodes"},"license":"MIT","private":false,"peerDependencies":{"@angular/core":">=5.2.0","@angular/common":">=5.2.0","@angular/router":">=5.2.0","rxjs":">=5.5.6"},"keywords":["angular","routerlink","delay","timer"],"main":"bundles/bcodes-ngx-routerlink-delay.umd.js","module":"esm5/bcodes-ngx-routerlink-delay.js","es2015":"esm2015/bcodes-ngx-routerlink-delay.js","typings":"bcodes-ngx-routerlink-delay.d.ts","metadata":"bcodes-ngx-routerlink-delay.metadata.json","dependencies":{"tslib":"^1.7.1"},"bugs":{"url":"https://github.com/briancodes/ngx-routerlink-delay/issues"},"homepage":"https://github.com/briancodes/ngx-routerlink-delay#readme","_id":"@bcodes/ngx-routerlink-delay@1.1.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"bcodes","email":"briannpm2357@gmail.com"},"dist":{"integrity":"sha512-hB5DixWTeHI+VoWHKdQS9JJoTDio4DK3VuBiqrRgvg1HZggG/dXOIN1/VR/PxUQPGg2e9x+nWhIfs1yHwd76pQ==","shasum":"510836cc2e4ece55c971f27d62181ba25d518447","tarball":"https://registry.npmjs.org/@bcodes/ngx-routerlink-delay/-/ngx-routerlink-delay-1.1.0.tgz","fileCount":16,"unpackedSize":73274,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE/zbSv3ubxJtkWWixBRXWgf/I9c7UUumA7C8IDduBe1AiEAh7Ev8MdHZWXKN3I32dyJa3g8t1kc+5AgCze02k88IHY="}]},"maintainers":[{"name":"bcodes","email":"briannpm2357@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngx-routerlink-delay_1.1.0_1521028337174_0.7790428915433822"},"_hasShrinkwrap":false},"2.0.0":{"name":"@bcodes/ngx-routerlink-delay","description":"Extension of the Angular RouterLinkWithHref directive a[routerLink] with an additional @Input data binding for delaying navigation","version":"2.0.0","repository":{"type":"git","url":"git+https://github.com/briancodes/ngx-routerlink-delay.git"},"author":{"name":"briancodes"},"license":"MIT","private":false,"peerDependencies":{"@angular/core":">=5.2.0","@angular/common":">=5.2.0","@angular/router":">=5.2.0","rxjs":">=6.2.0"},"keywords":["angular","routerlink","delay","timer"],"main":"bundles/bcodes-ngx-routerlink-delay.umd.js","module":"fesm5/bcodes-ngx-routerlink-delay.js","es2015":"fesm2015/bcodes-ngx-routerlink-delay.js","esm5":"esm5/bcodes-ngx-routerlink-delay.js","esm2015":"esm2015/bcodes-ngx-routerlink-delay.js","fesm5":"fesm5/bcodes-ngx-routerlink-delay.js","fesm2015":"fesm2015/bcodes-ngx-routerlink-delay.js","typings":"bcodes-ngx-routerlink-delay.d.ts","metadata":"bcodes-ngx-routerlink-delay.metadata.json","sideEffects":false,"dependencies":{"tslib":"^1.7.1"},"bugs":{"url":"https://github.com/briancodes/ngx-routerlink-delay/issues"},"homepage":"https://github.com/briancodes/ngx-routerlink-delay#readme","_id":"@bcodes/ngx-routerlink-delay@2.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"bcodes","email":"briannpm2357@gmail.com"},"dist":{"integrity":"sha512-Jy1Zd38hZOPM1wC5VV1uwSVWevIXEAPKse+n7pbPDuUxvqa1kLv5C+9zBaLb5pEJMWZCVDBgtABRobku3tHPtg==","shasum":"fec8094b8624cc3640c6872a55d484f5df9c03cb","tarball":"https://registry.npmjs.org/@bcodes/ngx-routerlink-delay/-/ngx-routerlink-delay-2.0.0.tgz","fileCount":26,"unpackedSize":145144,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbCbEzCRA9TVsSAnZWagAA3DoP/jmRnRYOe8pna2WZnAwm\nDLuB6Jp+JPFlZtHIkHmXiYp1MbpAboMMfgNEKGV6yOgkNEbzqUcpj2zIAWbt\nDy9B4NtT+hv8QMbbLigWj/TmmrVC4FbFwFdGkTICX33Z0KBDIJidiphPcqo4\n096WrW5b1evq8pPdxQf+vx5NNLqc0ksyMAoKbC63DhfVmw7xKfgdVQeh4GwB\n/Bqi33W76LSjA3H7CSsMSxsXDpqRofc6TZ/lnLGMBxkuD2M0qncqX9P+AVq8\nyV9U5wEogJHNPIxIbNv8Isdh4kGt/A0acD/00+VllzFH+LT9HXhUKqUm3I10\n9S9AMPby7PQVLIxre0ReSnkwpwGbN+RGX9KRDNRHX4TqBC6pVl5qVPgCnt3j\n+5LYEKf5wJgA1orOzT9uqLqpv45pb4gQl1GY5wHtleaHbc4ZLY0+LmWT7KhN\nq7X4SUqsFP+M8WfD6d+c7N52Y947HSglmcnoLu93kJgX+IcnvMU8/GVwpAld\nhCMmEWhFYfblolZJ0WdFoqGG9+BlFYjBFrvkN1RFVEhRgDILjQt82ZSIYPKG\nLu1Z+QGqXiWAcD0wFDskDARnAA7/Wu14HBVEY+2p8C48Ud9MybC+8iWHljoZ\nbP1zB1VTuiUi5zti38fsT5+NFifVvSeht3P6mvgTp++6qmnBIAaQoMw4ptl5\ng1H1\r\n=uF7G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJOyatsOVoh+NX2YhPt5cyZAtSLrNvkO34eLzjX9q6UAIgYhnnbCpbMW4I85CFb+v/J5CB/r5L/UItPY42e+04ElQ="}]},"maintainers":[{"name":"bcodes","email":"briannpm2357@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngx-routerlink-delay_2.0.0_1527361842688_0.9720854171664697"},"_hasShrinkwrap":false}},"time":{"created":"2018-03-07T22:09:09.519Z","1.0.0":"2018-03-07T22:09:09.749Z","modified":"2022-04-04T18:02:05.675Z","1.0.1":"2018-03-07T22:46:49.970Z","1.1.0":"2018-03-14T11:52:17.313Z","2.0.0":"2018-05-26T19:10:42.745Z"},"maintainers":[{"name":"bcodes","email":"briannpm2357@gmail.com"}],"description":"Extension of the Angular RouterLinkWithHref directive a[routerLink] with an additional @Input data binding for delaying navigation","homepage":"https://github.com/briancodes/ngx-routerlink-delay#readme","repository":{"type":"git","url":"git+https://github.com/briancodes/ngx-routerlink-delay.git"},"author":{"name":"briancodes"},"bugs":{"url":"https://github.com/briancodes/ngx-routerlink-delay/issues"},"license":"MIT","readme":"[![Build Status](https://travis-ci.org/briancodes/ngx-routerlink-delay.svg?branch=master)](https://travis-ci.org/briancodes/ngx-routerlink-delay)\r\n[![Build with Angular CLI](https://img.shields.io/badge/built%20with-Angular%20CLI-blue.svg)](https://github.com/angular/angular-cli)\r\n\r\n# @bcodes/ngx-routerlink-delay\r\n\r\nExtension of the RouterLinkWithHref directive `a[routerLink]` with an additional `@Input` data binding for delaying navigation\r\n\r\nPackaged as an Angular module using [ng-packagr](https://github.com/dherges/ng-packagr)\r\n\r\nDevelopment project generated with [Angular CLI](https://github.com/angular/angular-cli)\r\n\r\n# Usage\r\n\r\n```bash\r\nnpm install @bcodes/ngx-routerlink-delay\r\n```\r\nTo use the extended `routerLink` directive, import the module:\r\n```javascript\r\nimport { RouterLinkDelayModule } from '@bcodes/ngx-routerlink-delay';\r\n```\r\nReplace the default `routerLink` and `routerLinkActive` selectors with the extended ones: \r\n\r\n* `routerLink` -> `bcRouterLink` \r\n* `routerLinkActive` -> `bcRouterLinkActive`\r\n\r\nThe navigation delay `@Input` is in milliseconds: \r\n* [navigationDelay]=\"1000\"\r\n\r\n### Example\r\n`app.component.html`\r\n```html\r\n<div>\r\n    <a [bcRouterLink]=\"['/page-one']\" bcRouterLinkActive=\"active\" [navigationDelay]=\"1000\">\r\n        Page One\r\n    </a>\r\n    <a bcRouterLink=\"/page-two\" bcRouterLinkActive=\"active\" [navigationDelay]=\"2000\">\r\n        Page Two\r\n    </a>\r\n    <router-outlet></router-outlet>\r\n</div>\r\n```\r\n`app.module.ts`\r\n```typescript\r\nimport { AppComponent } from './app.component';\r\n\r\nimport { RouterLinkDelayModule } from '@bcodes/ngx-routerlink-delay';\r\nimport { PageOneComponent } from './pages/page-one/page-one.component';\r\nimport { PageTwoComponent } from './pages/page-two/page-two.component';\r\n\r\n@NgModule({\r\n    declarations: [\r\n        AppComponent,\r\n        PageOneComponent,\r\n        PageTwoComponent\r\n    ],\r\n    imports: [\r\n        BrowserModule,\r\n        AppRoutingModule,\r\n        RouterLinkDelayModule\r\n    ],\r\n    providers: [],\r\n    bootstrap: [AppComponent]\r\n})\r\nexport class AppModule { }\r\n```\r\n> **Why bcRouterLinkActive?** Internally `routerLinkActive` queries the template using the `type` of the `routerLink` directive i.e. `RouterLinkWithHref`. Extending `routerLink` meant we also had to extend `routerLinkActive` to query for the new `type`\r\n\r\n# Library Development: Build, Run, Test\r\n\r\n## Build the library\r\n\r\n* `npm run build:lib`\r\n\r\nThis will create a `dist/lib` folder with generated Angular module for distribution\r\n\r\n### Live Reload\r\n\r\nThe library source (*lib/src*) is located alongside a ready-to-run *Angular ClI* project. The library module has been imported in `app.module.ts`, and is ready to roll as is. The project can be served with `ng serve`, and any changes made to the the directive source files in *lib/src* will trigger a live reload\r\n\r\n### Symbolic npm link\r\n\r\nFor testing the *bundled* module locally, you can use `npm link`. You will firstly need to replace the `import` in `app.module.ts` as follows: \r\n\r\n```javascript\r\nimport { RouterLinkDelayModule } from '../../lib/src/router-link-delay.module';\r\n// replace with \r\nimport { RouterLinkDelayModule } from '@bcodes/ngx-routerlink-delay';\r\n```\r\n\r\nFrom the `dist/lib` folder run:\r\n* `npm link`\r\n\r\nIn the application root e.g. ngx-routerlink-delay folder, run: \r\n* `npm link @bcodes/ngx-routerlink-delay`\r\n\r\n## Run\r\n* `ng serve` or\r\n* `ng serve --preserve-symlinks`\r\n\r\n## Testing\r\n\r\nThe tests are contained in the `lib/test` folder. The files to be tested are imported from the `dist/lib` folder, so we are testing the bundled library\r\n\r\nThe test files are located outside of the root `src` folder and required the following changes to the test setup:\r\n\r\n`tsconfig.spec.json`\r\n```json\r\ntsconfig.spec.json\r\n\r\n\"include\": [\r\n    \"../lib/**/*.spec.ts\",\r\n    \"**/*.spec.ts\",\r\n    \"**/*.d.ts\"\r\n  ]\r\n```\r\n`tests.ts`\r\n```javascript \r\nconst context_lib = require.context('../lib', true, /\\.spec\\.ts$/);\r\ncontext_lib.keys().map(context_lib);\r\n```\r\n\r\nRun the tests with `ng test`, or `npm run test:lib` to do a build and test\r\n\r\n## License\r\n\r\nThis project is licensed under the terms of the MIT license\r\n\r\n\r\n\r\n\r\n\r\n\r\n","readmeFilename":"README.md","keywords":["angular","routerlink","delay","timer"]}