MCPcopy
hub / github.com/angular/angular / maybeResolveResources

Function maybeResolveResources

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

Source from the content-addressed store, hash-verified

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

Callers 2

loadComponentMethod · 0.85
loadChildrenFunction · 0.85

Calls 2

errorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…