{"repo":"mgechev/ngx-quicklink","free":true,"listed":false,"github":"https://github.com/mgechev/ngx-quicklink","clone":"git clone https://github.com/mgechev/ngx-quicklink.git","description":"Quicklink prefetching strategy for the Angular router","language":"TypeScript","stars":756,"topics":["performance","prefetch","speed","intersection-observer","angular"],"license":"MIT","category":"ui-components","readme_excerpt":"ngx-quicklink quicklink implementation for Angular. It provides router preloading strategy which automatically downloads the lazy-loaded modules associated with all the visible links on the screen. How it works Quicklink attempts to make navigations to subsequent pages load faster. It: Detects routerLink s within the viewport (using Intersection Observer) Waits until the browser is idle (using requestIdleCallback) Checks if the user isn't on a slow connection (using navigator.connection.effectiveType ) or has data-saver enabled (using navigator.connection.saveData ) Prefetches the lazy loaded modules using Angular's prefetching strategy) Why This project aims to be a drop-in solution for sites to prefetch links based on what is in the user's viewport. It also aims to be small ( 2KB minified/gzipped ). Usage First you need to install the project: After that import the QuicklinkModule to the AppModule , and use the QuicklinkStrategy as preloadingStrategy in the router's configuration. For example: If you want to add a route in the ignore list so that ngx-quicklink will not preload it use the data property: Note that to make the module available in lazy-loaded modules as well you need to import it in a shared module and export it. Look at this commit to see how ngx-quicklink is integrated in the angular-realworld-example-app. Standalone Approach Configure your ApplicationConfig like the following: Import QuicklinkDirective to your standalone components that have routerLinks Debu","default_branch":null,"files":null,"tree":[],"storefront":"/r/mgechev","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mgechev/ngx-quicklink/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}