{"_id":"@aleesaan/ng-scrollspy","_rev":"3-0254ecdeb495da457ce3b7a1a51fb426","name":"@aleesaan/ng-scrollspy","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@aleesaan/ng-scrollspy","version":"1.0.0","description":"A lightweight Angular library to detect the active section.","author":{"name":"aleesaan"},"repository":{"type":"git","url":"git+https://github.com/aleesaan/ng-scrollspy.git"},"bugs":{"url":"https://github.com/aleesaan/ng-scrollspy/issues"},"homepage":"https://github.com/aleesaan/ng-scrollspy","keywords":["angular","scrollspy","scroll spy"],"license":"MIT","peerDependencies":{"@angular/core":"7.2.5","rxjs":"6.4.0"},"main":"bundles/ng-scrollspy.umd.js","module":"fesm5/ng-scrollspy.js","es2015":"fesm2015/ng-scrollspy.js","esm5":"esm5/ng-scrollspy.js","esm2015":"esm2015/ng-scrollspy.js","fesm5":"fesm5/ng-scrollspy.js","fesm2015":"fesm2015/ng-scrollspy.js","typings":"ng-scrollspy.d.ts","metadata":"ng-scrollspy.metadata.json","sideEffects":false,"dependencies":{"tslib":"^1.9.0"},"_id":"@aleesaan/ng-scrollspy@1.0.0","_npmVersion":"6.2.0","_nodeVersion":"8.11.3","_npmUser":{"name":"aleesaan","email":"alesan.t90@gmail.com"},"dist":{"integrity":"sha512-AA8DqQoF0aEj6K81nTv+BpEkFi+1Ijww2+lOo+1pxtFs5b3m5GVh0aPeLDOk4aXQ942ah3cm7og4cJ0cozlBZA==","shasum":"f81cf9dc044ee96004898cc2c8dcdcd0f3231176","tarball":"https://registry.npmjs.org/@aleesaan/ng-scrollspy/-/ng-scrollspy-1.0.0.tgz","fileCount":26,"unpackedSize":125652,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmNzSCRA9TVsSAnZWagAAZ1cQAIc9F/OIKjGkJsVwwRGB\nMztJYeYrNcCpChEIBYUR3iqvLxbEF03NXtNFNnHWFc6WeiA62KEBa48NFXam\nNjhJyO17rOvIMu1a4VhsWVIt8fBiITbsm5pxKUN3g6VjSo8SQeV0An7t50oj\n/xwJLKR7RP7a5jwtQouKb54Ru8CjtgT3WL00km2NUTUBsLHpiT+SQd9PQEZb\nVLuk2ilxi+LUhfJDMMjl17xzuC2zfg+bvqvCtKu9YeAYsd1je+24cYxiQ94n\nAw4kG2ruASYJyywxuHZLjXXskrZW2ATrDWqomALLsjpGldlLIEjNylcIw1Td\nu94V2aT5g4/JKOuQpeQ6yBXE6cY3SSPc9JSY9EBluF/OJHG4xlpMVp436Pl5\nzmRIJTYBkj0H7lvJcQPRMEwdd2N0jLJqq5FVgcPXgk/VA0SWL4semefJJ5Ry\nxAZJOz2qv03oCGSNgps4T45DCQteiEp8HBGTH5ZlxR+5x44M5vcWAx7wEBrB\nEo45k95I/5rcUmzLSApnW3gaMT5VAppEymUiCA0jaNZxreqs85uYHutvCHvj\n/vRhMw2ZnLgC4I2aPWUa8vgr4rxPGIL9T7L9D/VDWRK40ScEDTsTLqNKkXKP\nUbd6rvCIHI0vuGWSSK1EPuGCxU9IMlZZRz0PflFImWK5GOJ3+xKHVyEVNPVF\nqAcl\r\n=MOPp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0841kd7CFKem410M7OzKe4b/ksHBGypVRrDKNngSm+QIgHMtBGqgOrmMrSPguAEPXhz3z3Yi21I0eI8EDq9o/j2U="}]},"maintainers":[{"name":"aleesaan","email":"alesan.t90@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-scrollspy_1.0.0_1553521873647_0.6928404438259805"},"_hasShrinkwrap":false},"1.0.1":{"name":"@aleesaan/ng-scrollspy","version":"1.0.1","description":"A lightweight Angular library to detect the active section.","author":{"name":"aleesaan"},"repository":{"type":"git","url":"git+https://github.com/aleesaan/ng-scrollspy.git"},"bugs":{"url":"https://github.com/aleesaan/ng-scrollspy/issues"},"homepage":"https://github.com/aleesaan/ng-scrollspy","keywords":["angular","scrollspy","scroll spy"],"license":"MIT","peerDependencies":{"@angular/core":"7.2.5","rxjs":"6.4.0"},"main":"bundles/ng-scrollspy.umd.js","module":"fesm5/ng-scrollspy.js","es2015":"fesm2015/ng-scrollspy.js","esm5":"esm5/ng-scrollspy.js","esm2015":"esm2015/ng-scrollspy.js","fesm5":"fesm5/ng-scrollspy.js","fesm2015":"fesm2015/ng-scrollspy.js","typings":"ng-scrollspy.d.ts","metadata":"ng-scrollspy.metadata.json","sideEffects":false,"dependencies":{"tslib":"^1.9.0"},"_id":"@aleesaan/ng-scrollspy@1.0.1","_npmVersion":"6.2.0","_nodeVersion":"8.11.3","_npmUser":{"name":"aleesaan","email":"alesan.t90@gmail.com"},"dist":{"integrity":"sha512-RPnVFg7OUdT7k2MUE0STUX5SxiixBNl29LSjxygQVhiJfJvEIzdskfRjO/nMPvrgJM16RjJfxAT9wys0TFaAzw==","shasum":"a3c04d0fca81a6700677fe06d611720ed4cef7eb","tarball":"https://registry.npmjs.org/@aleesaan/ng-scrollspy/-/ng-scrollspy-1.0.1.tgz","fileCount":26,"unpackedSize":125638,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmN1FCRA9TVsSAnZWagAAO+8P/0ENpeN7Xz7IjZq48Yq0\np5YklIAb5A/9GYN8cUEqO6t9AZh5ZqyTYaoehPgYCDfVd2chBqj32v+Kzr72\nXShvriH4VQimlGev3ZEDU11zNjG4uF3+49WH755z15gnme/7EnzQcV1NpLGy\nw/gFv6nOCHZCPfvT9WEqO7LIDJ26xt5tsHgxWtjp6E8UCCsKSS45CUvy84Aa\nxmUecC/KqpkVkcVTbx6gdlhn/8mKL/atl1vRFphF7s2fcGddML4vH6ysbP6r\nIKAkiIBW6xckxDF9e8tp99TkGpy7EBpbmv8s6apK5iLgKG7jDWVBalj269x5\nEP4+N5avKI9pxWwD1Crs3BuP5X88jAL4Ctfx7krOutsvL73jSj3nd5F80nq+\nrUm2EJfh1tfB1O1087KDpJjf2/0CMLQhyCmx42rnZ0vxxFeCJ9/vdSvmF75u\nd/QkZn/lQWYfYASZxrItr2XGgVeKpEMlsGm0JrtAdiKgDcrwkdeUf3JSLRg2\n3USqrwEwZWV7H4ZWim7Zli4MOGiONItazCsqfykx3T4+9oktr5htDea6s95s\nDbNyjZFC/mH7xDAj0O1v0BMzNPJ82Jcyu+iaBZ6kFP9vBfAFOoHiFwHpqTOh\n0ChDcSShVsAW6N5bkKVFxSC5y1x1A+aDb6CjA66IwC4ou5xh3A7zdKmkJ6Z7\nCJql\r\n=sAGO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPt6H5BzmeUVAnZwTWwaWgtVd1wcWFX52KBKK74Nl84QIhAPDyIdsTdhP9fUDAfBcuAmRvywSUsDSXmF74QQn6Fi2F"}]},"maintainers":[{"name":"aleesaan","email":"alesan.t90@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-scrollspy_1.0.1_1553521988399_0.6856101404410806"},"_hasShrinkwrap":false},"1.0.2":{"name":"@aleesaan/ng-scrollspy","version":"1.0.2","description":"A lightweight Angular library to detect the active section.","author":{"name":"aleesaan"},"repository":{"type":"git","url":"git+https://github.com/aleesaan/ng-scrollspy.git"},"bugs":{"url":"https://github.com/aleesaan/ng-scrollspy/issues"},"homepage":"https://github.com/aleesaan/ng-scrollspy","keywords":["angular","scrollspy","scroll spy"],"license":"MIT","peerDependencies":{"@angular/core":"7.2.5","rxjs":"6.4.0"},"main":"bundles/aleesaan-ng-scrollspy.umd.js","module":"fesm5/aleesaan-ng-scrollspy.js","es2015":"fesm2015/aleesaan-ng-scrollspy.js","esm5":"esm5/aleesaan-ng-scrollspy.js","esm2015":"esm2015/aleesaan-ng-scrollspy.js","fesm5":"fesm5/aleesaan-ng-scrollspy.js","fesm2015":"fesm2015/aleesaan-ng-scrollspy.js","typings":"aleesaan-ng-scrollspy.d.ts","metadata":"aleesaan-ng-scrollspy.metadata.json","sideEffects":false,"dependencies":{"tslib":"^1.9.0"},"_id":"@aleesaan/ng-scrollspy@1.0.2","_npmVersion":"6.2.0","_nodeVersion":"8.11.3","_npmUser":{"name":"aleesaan","email":"alesan.t90@gmail.com"},"dist":{"integrity":"sha512-np73bw8jwu2S1qQBYU/ySZGF89qTjUbvA9yyoq3Ea0rqfqR020V9nHXyjt0mb49yNNZjXWe+NxK+gjrCatYIMg==","shasum":"c0bcc78cb94089e8c052520a022fc569da5c5ff5","tarball":"https://registry.npmjs.org/@aleesaan/ng-scrollspy/-/ng-scrollspy-1.0.2.tgz","fileCount":26,"unpackedSize":126026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmhcPCRA9TVsSAnZWagAAhT8P/RO6UCt/X29/c2jpV60s\ntLVkUtiMf/akcrbCd5D/Xqn4Be7S/YsfY/cYU9nyfsDifqMV84RSC3QielD8\nlGsadwpfJmZvN8pf7/eZQreKULrTvkaMzr7/T8d4Z8yIC8/dssEef/B1EGfi\nheNObbVWy/WneDQFC1+Aq33n11gKCURP/JfgaTy9swxXnlPGYBHo5Q13q5wA\nCKALeLsiqyFvUf+ikf6+cNMwurE4UBOylF2OConRM5ucP2St7DPy9SRfp9Uw\nnW1/PP2w6vDsum4/If/du3jEUr8o/blcgkO6rSKcVI4FKl9ys9kB1jpYPMt9\n+n4nk2/OO9FAtdEmhiDzJcMUhBhavqZKV0RD1+D02UTOacgiyn5jxF1Ikile\n+pe8kZNWzMphVOWEDuhtNBa5zyFKSrXnvKzansWFd3pufv4sEKmTYHt7be4A\nRzbv4jF+UvtnKmxUorEJzLbytSPry8bkB6WH2uQ/yhKGW2jRFtlOzzdisE5Y\npemm13uZx/pPgqE0AvBZxEGrfaXSNzn7/zPKwtCzWyFBbsKmzzefONJXXZcD\n3Oq7tf/fSaSi5LEtPCbOsbg0QxMYEDtqEIaBdQb8a95NM5hypU/0AJhd1LvO\nMDoY1xl8HsmfpVNRNzVVEUsDc4xGKV8S2b3j01wXNFcWPBo4poos63BDiTTB\n9HHZ\r\n=OgKo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE84dYARaxlAOZMq7/aKUGym3fpw+Zfn4Em9m3J72A3OAiEA9VQ2QuzJj9J12surudwIYZfQ7hXH17LArF0BP/J1PKU="}]},"maintainers":[{"name":"aleesaan","email":"alesan.t90@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-scrollspy_1.0.2_1553602319176_0.23074787540714947"},"_hasShrinkwrap":false}},"time":{"created":"2019-03-25T13:51:13.473Z","1.0.0":"2019-03-25T13:51:13.757Z","modified":"2022-04-04T12:37:01.443Z","1.0.1":"2019-03-25T13:53:08.562Z","1.0.2":"2019-03-26T12:11:59.343Z"},"maintainers":[{"name":"aleesaan","email":"alesan.t90@gmail.com"}],"description":"A lightweight Angular library to detect the active section.","homepage":"https://github.com/aleesaan/ng-scrollspy","keywords":["angular","scrollspy","scroll spy"],"repository":{"type":"git","url":"git+https://github.com/aleesaan/ng-scrollspy.git"},"author":{"name":"aleesaan"},"bugs":{"url":"https://github.com/aleesaan/ng-scrollspy/issues"},"license":"MIT","readme":"# Angular Scroll Spy\nA lightweight Angular library to detect the active section.  \n  \n:shipit:  \n  \n[See the demo here](https://aleesaan.github.io/ng-scrollspy/).\n\n### Features:\n* Super smooth!\n* Works for nested and dynamically generated elements\n* Supports multiple spies\n* No other dependencies\n\n### Installation\nFirst install the library.\n\n```\nnpm install ng-scrollspy\n```\n\nThen import the **NgScrollSpyModule** in your module.\n\n```ts\nimport { NgScrollSpyModule } from 'ng-scrollspy';\n\n@NgModule({\n  ...\n  imports: [\n    NgScrollSpyModule,\n  ],\n  ...\n})\nexport class AppModule {}\n```\n\n### Usage:\nThe **NgScrollSpyModule** comes with a directive and a service.  \nThe `scrollSpyElement` directive has to be applied on the elements to be spied, together with a unique `id`:\n\n```html\n<h2 scrollSpyElement id=\"firstSpiedElement\">\n  I am the first being spied!\n</h2>\n```\n\nIn your component, on `AfterViewInit`, you can subscribe to the `ScrollSpyService` for updates on the currently active section:\n\n```ts\nimport { ScrollSpyService } from 'ng-scrollspy';\n\n@Component()\nexport class AppComponent implements AfterViewInit {\n  constructor(private scrollSpy: ScrollSpyService) {}\n\n  public ngAfterViewInit(): void {\n    this.subsribeScrollSpy();\n  }\n\n  private subsribeScrollSpy(): void {\n    this.scrollSpy.getCurrentSection$()\n      .subscribe((section: string): void => {\n        console.log(`${section} is active!`);\n      });\n  }\n}\n```\n\n#### Multiple spies:\nYou might need to have different spies at the same time, like in a page with multiple menus.  \nYou can specify this as an input to the directive:\n\n```html\n<h2 scrollSpyElement scrollSpyId=\"sub-menu\" id=\"subMenuElement1\">\n  I am the first spied element of a sub menu!\n</h2>\n```\n\nIn the service, you can then subscribe to the spy you specified:\n```ts\nthis.scrollSpy.getCurrentSection$('sub-menu')\n  .subscribe((subSection: string): void => {\n    console.log(`${subSection} is active!`);\n  });\n```\n\nJust make sure to call your additional spies something other than `default`, which is used for the (you guessed it) default spy.\n","readmeFilename":"README.md"}