I am new to Angular JS and working on creating a table where dynamic rows can be added. The new row contains a checkbox which should default to selected (value=Y). For existing data it should show what comes up from DB (Y or N)
<input type="checkbox" ng-model="safetyCheck.needed"
value="{{safetyCheck.needed}}" />
I tried adding ng-checked="safetyCheck==Y" and set $safetyCheck:Y when pushing a new blank row. But this always results in Y even if users unselects the component. how can i fix this.
ng-checkedwithng-model