/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/material-experimental/selection/selection-toggle.ts
31 строка
1 KB
Kristiyan Kostadinov
refactor(multiple): remove standalone flag from experimental packages
17 окт 2024, 17:40
17 окт 2024, 17:40
0c0b122
Код
Авторство
О чём код?
/** * @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 {CdkSelectionToggle} from '@angular/cdk-experimental/selection'; import {Directive, Input} from '@angular/core'; /** * Makes the element a selection toggle. * * Must be used within a parent `MatSelection` directive. * Must be provided with the value. If `trackBy` is used on `MatSelection`, the index of the value * is required. If the element implements `ControlValueAccessor`, e.g. `MatCheckbox`, the directive * automatically connects it with the selection state provided by the `MatSelection` directive. If * not, use `checked$` to get the checked state of the value, and `toggle()` to change the selection * state. */ @Directive({ selector: '[matSelectionToggle]', exportAs: 'matSelectionToggle', inputs: [{name: 'index', alias: 'matSelectionToggleIndex'}], providers: [{provide: CdkSelectionToggle, useExisting: MatSelectionToggle}], }) export class MatSelectionToggle<T> extends CdkSelectionToggle<T> { /** The value that is associated with the toggle */ @Input('matSelectionToggleValue') override value: T = undefined!; }