/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/forms/signals/src/api/di.ts
36 строк
1 KB
SkyZeroZx
docs: add `@see` references to Signal Forms
06 июл 2026, 23:35
06 июл 2026, 23:35
bbbcf8f
Код
Авторство
О чём код?
/** * @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 {type Provider} from '@angular/core'; import type {FormFieldBinding} from '../api/types'; import {SIGNAL_FORMS_CONFIG} from '../field/di'; /** * Configuration options for signal forms. * * @see [Automatic status classes](guide/forms/signals/migration#automatic-status-classes) * * @publicApi 22.0 */ export interface SignalFormsConfig { /** A map of CSS class names to predicate functions that determine when to apply them. */ classes?: { [className: string]: (formField: FormFieldBinding) => boolean; }; } /** * Provides configuration options for signal forms. * * @see [Automatic status classes](guide/forms/signals/migration#automatic-status-classes) * * @publicApi 22.0 */ export function provideSignalFormsConfig(config: SignalFormsConfig): Provider[] { return [{provide: SIGNAL_FORMS_CONFIG, useValue: config}]; }