jeudi 18 février 2016

data-checklist-model with nested ng-repeat not working

I am using angularjs and data-checklist-model.But i am not getting the checked value. Here is my code.

<div  ng-repeat='item in categorywisetag'>
              <div class="row text-center" style="margin-top:49px;width:55%;margin:0 auto">
                  <span><large>{{item.name}}</large></span>
                  <div ng-repeat="itemtag in item.tag">
                          <div class="cat-button">
                              <label><input type="checkbox" data-checklist-model="x.item.tag" data-checklist-value="itemtag.id"><span>{{itemtag.name}}</span>
                              </label>
                          </div>
                  </div>
              </div>
          </div>

And on submit when i try to access the checked boxes: it gives me undefined:

 $scope.createwar = function(){
            console.log($scope.x.item.tag);
     }

Where am i going wrong?




Aucun commentaire:

Enregistrer un commentaire