I have cascaded drop-down and list. I'm trying to add new input in as object {'name':'pizzaName','sizes':['availableSizes']} so it's added to the existing list, which is used by the user to select pizza and their available size. The problem faced is the selection of check box, because it checks them all together and doesn't update to the list. When the add button is clicked both the drop-down and check boxes assign some value and displays a empty space both in the drop-down and check box.
Html:
Enter the new Pizza Name:
<input type="text" ng-model="newName">
Select size availabel:
<ul>
<li>Small</li>
<label>
<input type="checkbox" ng-model="selected_input.checked">
</label>
<li>Medium</li>
<label>
<input type="checkbox" ng-model="selected_input.checked">
</label>
</ul>
<button ng-click="add()">Add</button><br>
<br>
Aucun commentaire:
Enregistrer un commentaire