Having a issue with using ngModel
to pass a value to bump object property retrieved from the bumpDetail.name
array.
I've included my code snippet below.
Can someone please review it and point out where I've made a mistake? Thank you.
<p *ngFor="let bumpDetail of bumpDetail">
<input type="checkbox" id="device" [(ngModel)]={{bump.bumpDetail.name}}/>
<label for="device">{{bumpDetail.name}}</label>
</p>
Bump[] = [{
"name": "bump_1",
"status": true
}, {
"name": "bump_2",
"status": false
}, {
"name": "bump_3",
"status": true
}]
There seems to be an error here.
Parser Error: Got interpolation ({{}}) where expression was expected at column 0 in [{{bumpDetail.name}}] in ng:///AppModule/SettingComponent.html@129:59 ("p *ngFor="let bumpDetail of bumpDetail">