(fullPath: string, component: Type<unknown> | undefined)
| 71 | } |
| 72 | |
| 73 | export function assertStandalone(fullPath: string, component: Type<unknown> | undefined): void { |
| 74 | if (component && isNgModule(component)) { |
| 75 | throw new RuntimeError( |
| 76 | RuntimeErrorCode.INVALID_ROUTE_CONFIG, |
| 77 | `Invalid configuration of route '${fullPath}'. You are using 'loadComponent' with a module, ` + |
| 78 | `but it must be used with standalone components. Use 'loadChildren' instead.`, |
| 79 | ); |
| 80 | } else if (component && !isStandalone(component)) { |
| 81 | throw new RuntimeError( |
| 82 | RuntimeErrorCode.INVALID_ROUTE_CONFIG, |
| 83 | `Invalid configuration of route '${fullPath}'. The component must be standalone.`, |
| 84 | ); |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | function validateNode(route: Route, fullPath: string, requireStandaloneComponents: boolean): void { |
| 89 | if (typeof ngDevMode === 'undefined' || ngDevMode) { |
no test coverage detected
searching dependent graphs…