/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/material/datepicker/datepicker.ts
27 строк
1 KB
Kristiyan Kostadinov
refactor(material/datepicker): remove explicit change detection
09 май 2026, 06:37
09 май 2026, 06:37
69ebfa4
Код
Авторство
О чём код?
/** * @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, ViewEncapsulation} from '@angular/core'; import {MatDatepickerBase, MatDatepickerControl} from './datepicker-base'; import {MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER} from './date-selection-model'; // TODO(mmalerba): We use a component instead of a directive here so the user can use implicit // template reference variables (e.g. #d vs #d="matDatepicker"). We can change this to a directive // if angular adds support for `exportAs: '$implicit'` on directives. /** Component responsible for managing the datepicker popup/dialog. */ @Component({ selector: 'mat-datepicker', template: '', exportAs: 'matDatepicker', encapsulation: ViewEncapsulation.None, providers: [ MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER, {provide: MatDatepickerBase, useExisting: MatDatepicker}, ], }) export class MatDatepicker<D> extends MatDatepickerBase<MatDatepickerControl<D>, D | null, D> {}