You change the state of checked in such a way(您以这种方式更改已检查状态)
[checked]="variable_name"
here the variable should be boolean.(这里的变量应该是布尔值。)
Also write the below line in ngOnInit in lifecyle hook(同样在lifecyle钩子的ngOnInit中写下以下行)
variable_name = JSON.parse(localstorage.getItem('fieldName_in_localStorage'))
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…