withAutoCleanupInjectors
함수
안정화v22.2부터
Enables automatic destruction of unused route injectors.
@returns
AutoCleanupInjectorsFeature설명
When enabled, the router will automatically destroy EnvironmentInjectors associated with Routes
that are no longer active or stored by the RouteReuseStrategy.
This feature is opt-in and requires RouteReuseStrategy.shouldDestroyInjector to return true
for the routes that should be destroyed. If the RouteReuseStrategy uses stored handles, it
should also implement retrieveStoredRouteHandles to ensure injectors for handles that will be
reattached are not destroyed.
상세 내용으로 이동