/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/forms/signals/compat/src/api/di.ts
27 строк
919 B
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 {SignalFormsConfig} from '../../../src/api/di'; /** * A value that can be used for `SignalFormsConfig.classes` to automatically add * the `ng-*` status classes from reactive forms. * * @see [Automatic status classes](guide/forms/signals/migration#automatic-status-classes) * * @publicApi 22.0 */ export const NG_STATUS_CLASSES: SignalFormsConfig['classes'] = { 'ng-touched': ({state}) => state().touched(), 'ng-untouched': ({state}) => !state().touched(), 'ng-dirty': ({state}) => state().dirty(), 'ng-pristine': ({state}) => !state().dirty(), 'ng-valid': ({state}) => state().valid(), 'ng-invalid': ({state}) => state().invalid(), 'ng-pending': ({state}) => state().pending(), };