简体   繁体   English

如何在 Angular 中的页面更改后保持选中 mat-checkbox?

[英]How to remain mat-checkbox checked after a page change in Angular?

Here is my mat-checkbox.这是我的垫子复选框。

<mat-checkbox (click)="$event.stopPropagation()"
   (change)="$event ? selection.toggle(element) : null"
   [checked]="selection.isSelected(element)">
</mat-checkbox>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Angular 7中选中标记mat-checkbox - How to mark mat-checkbox as checked in Angular 7 angular mat-checkbox选中值 - angular mat-checkbox checked value 角材料:更改垫子复选框和垫子收音机上的标签文本颜色已选中 - Angular material: Change label text color on mat-checkbox and mat-radio checked 获取 mat-checkbox 的选中值 - Angular Material - Getting the checked value of a mat-checkbox - Angular Material Angular mat-checkbox 选中不等于表单组 - Angular mat-checkbox checked not equal to form group Angular 7 mat-checkbox未使用反应形式进行检查 - Angular 7 mat-checkbox not being checked with reactive forms Angular:如何映射&#39;mat-checkbox&#39;数组以获取与选中复选框相关联的字符串 - Angular: How to map an array of 'mat-checkbox's to get strings associated with the checked checkboxes 如何迭代对象数组并更新时间,如果<mat-checkbox>在 angular 9 中检查?</mat-checkbox> - How to iterate over array of objects and update time if <mat-checkbox> is checked in angular 9? 如何使用 Angular 6 中的 api 响应将 mat-checkbox 设置为选中和取消选中 - How to set mat-checkbox as checked and unchecked using api response in Angular 6 如何更改 angular 组件中 mat-checkbox 的 angular 材料复选框的 css - how to change the css of angular material checkbox of mat-checkbox in an angular component
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM