You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! First of all, I would like to express my gratitude for creating such a project)
We are using this lib on a fairly large application and recently discovered two rather critical problems with preloading components.
The first of them is loading unnecessary components. If there is at least one link with routerLink directive and QuicklinkModule on the page, then the preloading process for the routing config is launched and, due to an erroneous determination of the appropriate path, unnecessary components are loaded.
The second problem is that the necessary components do not load. This is also due to the fact that the required paths are not matched correctly and they are skipped for preloading.
Both of these problems arise due to the download necessity check utility (to be more precise, due to findPath util), which has two bugs:
I've created a fork with an updated app so u can check a case when we don't load necessary chunks and load unnecessary (u should visit the /other-section and u will see that we are not loading a component for the /other-section/common-info path and loading script for the /other-section/:subSectionSlug/:pageSlug path) https://github.com/BEGEMOT9I/ngx-quicklink
The text was updated successfully, but these errors were encountered:
Hi! First of all, I would like to express my gratitude for creating such a project)
We are using this lib on a fairly large application and recently discovered two rather critical problems with preloading components.
The first of them is loading unnecessary components. If there is at least one link with
routerLink
directive andQuicklinkModule
on the page, then the preloading process for the routing config is launched and, due to an erroneous determination of the appropriate path, unnecessary components are loaded.The second problem is that the necessary components do not load. This is also due to the fact that the required paths are not matched correctly and they are skipped for preloading.
Both of these problems arise due to the download necessity check utility (to be more precise, due to
findPath
util), which has two bugs:_loadedRoutes
is always empty so we are not pushing child routes for traversing):https://github.com/mgechev/ngx-quicklink/blob/master/projects/ngx-quicklink/src/lib/quicklink-strategy.service.ts#L51
/
)https://github.com/mgechev/ngx-quicklink/blob/master/projects/ngx-quicklink/src/lib/quicklink-strategy.service.ts#L68
I've created a fork with an updated app so u can check a case when we don't load necessary chunks and load unnecessary (u should visit the
/other-section
and u will see that we are not loading a component for the/other-section/common-info
path and loading script for the/other-section/:subSectionSlug/:pageSlug
path)https://github.com/BEGEMOT9I/ngx-quicklink
The text was updated successfully, but these errors were encountered: