I have model class like:
processAnexOne.ts
export class ProcessAnexOne {
documentList: string;
}
and inside component class i have declared
export class ProcessAnexOneComponent implements OnInit {
processAnexOne: ProcessAnexOne = new ProcessAnexOne();
}
The problem i am getting is at its HTML file.I have three checkbox but when i click on one of the checkbox all three of the checkboxes is selected. I dont know what is wrong in my code. I just need to select single checkbox.
<div class="form-group col-md-12">
<div class="col-md-4 panel panel-default">
<h3>Document List</h3>
<div class="form-check">
<label class="form-check-label" for="check1">
<input type="checkbox" class="form-check-input" id="check1" name="option1" value="something" [(ngModel)]="processAnexOne.documentList" >Option 1
</label>
</div>
<div class="form-check">
<label class="form-check-label" for="check2">
<input type="checkbox" class="form-check-input" id="check2" name="option2" value="something" [(ngModel)]="processAnexOne.documentList">Option 2
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" class="form-check-input" [(ngModel)]="processAnexOne.documentList">Option 3
</label>
</div>