I expected AutoRouter.of to find my nested declarative router but doesn't. I think its because AutoRouter.of is actually calling and looking for StackRouterScope while declarative routers are scoped with HeroControlledScope.
Both scopes have NestedStackRouters so my expectation was, since AutoRouter.of returns StackRouter, that it would find the declarative router as well.
My current workaround is to call RouteScope.of and check/cast controller type.
I expected
AutoRouter.of
to find my nested declarative router but doesn't. I think its becauseAutoRouter.of
is actually calling and looking forStackRouterScope
while declarative routers are scoped withHeroControlledScope
.Both scopes have
NestedStackRouter
s so my expectation was, sinceAutoRouter.of
returnsStackRouter
, that it would find the declarative router as well.My current workaround is to call
RouteScope.of
and check/castcontroller
type.