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
The load resolver can be called from within another resolver by accessing it through the route config.
exportconstrouteMeta: RouteMeta={resolve: {data: async(route)=>{// call server load resolver for this route from another resolverconstdata=awaitroute.routeConfig?.resolve?.['load']?.(route);return{ ...data};}}}
We can add a utility function for this named getLoadResolver and use it as getLoadResolver(route).
import{getLoadResolver}from'@analogjs/router';exportconstrouteMeta: RouteMeta={resolve: {data: async(route)=>{// call server load resolver for this route from another resolverconstdata=awaitgetLoadResolver(route);return{ ...data};}}}
The
load
resolver can be called from within another resolver by accessing it through the route config.We can add a utility function for this named
getLoadResolver
and use it asgetLoadResolver(route)
.Originally posted by @brandonroberts in #1039 (comment)
The text was updated successfully, but these errors were encountered: