UNPKG

@ng-doc/app

Version:

<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/ng-doc/ng-doc"> <img src="https://ng-doc.com/assets/images/ng-doc.svg?raw=true" alt="Logo" height="150px"> </a>

37 lines (33 loc) 864 B
import { InjectionToken } from '@angular/core'; const tokenStore = new Map(); /** * * @param type * @param control * @param options * @param playgroundId * @param selector * @param component */ function providePlaygroundDemo(playgroundId, component) { const token = tokenStore.get(playgroundId) ?? new InjectionToken(`NG_DOC_PLAYGROUND_DEMO_${playgroundId}`); tokenStore.set(playgroundId, token); return { provide: token, useValue: component, multi: true, }; } /** * Returns the token for the given playground id. * @param playgroundId */ function getPlaygroundDemoToken(playgroundId) { return tokenStore.get(playgroundId); } /** * Generated bundle index. Do not edit. */ export { getPlaygroundDemoToken, providePlaygroundDemo }; //# sourceMappingURL=ng-doc-app-providers-playground-demo.mjs.map