I have a character which can contain multiple skills. Skills are available from an injected service. What I basically want is this:
<div ng-repeat="skill in character.getSkills()">
<select ng-model="skill" ng-options="select as s.toString() for s in getAllSkills()"></select>
<button ng-click="character.removeSkill(skill)" >Remove Skill</button>
</div>
With this code, the select box doesn't work as I would expect it. Skills are not set in the character, and selections are not kept in the drop down.
Am I missing something?
Thanks in advance, roemer
ng-mode="skill"will create askillprimitive property on the child scope, not on the scope wherecharacteris defined. See stackoverflow.com/questions/14049480/… (section ng-repeat) for some ideas.skillis an object. (It would be helpful to include some more code next time.)