/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
adev/src/app/features/references/api-item-label/api-item-label.component.ts
24 строки
706 B
Matthieu Riegler
docs(docs-infra): remove explicit OnPush
25 мар 2026, 22:58
25 мар 2026, 22:58
1938054
Код
Авторство
О чём код?
/*! * @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 {Component, computed, input} from '@angular/core'; import {ApiItemType} from '../interfaces/api-item-type'; import {shortLabelsMap} from '../pipes/api-label.pipe'; @Component({ selector: 'docs-api-item-label', host: { '[class]': `clazz()`, }, template: `{{ label() }}`, }) export default class ApiItemLabel { readonly type = input.required<ApiItemType>(); readonly label = computed(() => shortLabelsMap[this.type()]); readonly clazz = computed(() => `type-${this.type()}`); }