/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
adev/src/app/core/services/example-content-loader.service.ts
19 строк
547 B
Kristiyan Kostadinov
fix(docs-infra): switch remaining adev services to `@Service`
08 май 2026, 01:23
08 май 2026, 01:23
1f238ab
Код
Авторство
О чём код?
/*! * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Service, Type, inject} from '@angular/core'; import {PREVIEWS_COMPONENTS} from '@angular/docs'; @Service({autoProvided: false}) export class ExampleContentLoader { private readonly previewsComponents = inject(PREVIEWS_COMPONENTS); loadPreview(id: string): Promise<Type<unknown>> { return this.previewsComponents[id](); } }