lundi 27 juin 2016

Get item values from checked items with AngularJS

I currently have a webpage set up that shows a tile with some info on it. I want this tile to remain unchanged. There are any number of tiles in a column, and I've formatted it so that a checkbox sits next to each tile. I want to write some Angular code that gets the info for each tile when a button is clicked, however the way it is written now does not bind the data to the checkbox. Is there a way to get this data? I've tried a foreach statement but it only gets html info for the checkboxes rather than the tiles.

<div ng-repeat="item in group.items">                 
     <span>
          <input type="checkbox" class="checkbox-item" ng-model="item.checked" ng-click="updateBulkSelectedCount(item)"/>
     </span>

     <div>
          <a href="" ng-click="vm.go(item)" ui-sref="foo.bar({Id: item.Id, docNumber: item.Identifier})">
          <div class="tile"></div>
     </div>
</div>




Aucun commentaire:

Enregistrer un commentaire