This is my Angular code.
<input type="checkbox" [checked]="fields.check3?.5 != undefined && fields.check3?.5 =='on' ">
At runtime, the browser is throwing the following exception.
Uncaught Error: Template parse errors:
Parser Error: Unexpected token 5, expected identifier or keyword at column 28 in [fields.check3?.'5' != undefined
My data is like this:
"check3": {
"5": "on"
}
Can I not use a number as a property? How can i use the same data?
Thank you
Aucun commentaire:
Enregistrer un commentaire