MCPcopy Create free account
hub / github.com/angular/angular / maybeResolveResources

Function maybeResolveResources

packages/router/src/router_config_loader.ts:174–187  ·  view source on GitHub ↗
(value: T)

Source from the content-addressed store, hash-verified

172}
173
174async function maybeResolveResources<T>(value: T): Promise<T> {
175 // In JIT mode we usually resolve the resources of components on bootstrap, however
176 // that won't have happened for lazy-loaded. Attempt to load any pending
177 // resources again here.
178 if ((typeof ngJitMode === 'undefined' || ngJitMode) && typeof fetch === 'function') {
179 try {
180 await resolveComponentResources(fetch);
181 } catch (error) {
182 console.error(error);
183 }
184 }
185
186 return value;
187}

Callers 2

loadComponentMethod · 0.85
loadChildrenFunction · 0.85

Calls 2

errorMethod · 0.65

Tested by

no test coverage detected