( name: string, injector: Injector, )
| 9 | * entry-points for the example modules under the `<host>/bundles/` URL. |
| 10 | */ |
| 11 | export async function loadExample( |
| 12 | name: string, |
| 13 | injector: Injector, |
| 14 | ): Promise<{component: Type<any>; injector: Injector}> { |
| 15 | const {componentName, importPath} = EXAMPLE_COMPONENTS[name]; |
| 16 | const moduleExports = await import(`/bundles/components-examples/${importPath}/index.js`); |
| 17 | const componentType: Type<any> = moduleExports[componentName]; |
| 18 | |
| 19 | return { |
| 20 | component: componentType, |
| 21 | injector, |
| 22 | }; |
| 23 | } |
no outgoing calls
no test coverage detected