List-Item Directive with Checkbox inside, not possible?


#1

Hey, im trying to get a checkbox inside an Item-Directive, but it doesn’t work.

Any ideas / hints? :smile:


#2

How about this :


#3

Thanks, very close.

But with this example there are no delete buttons and no swipe buttons…

I tried to create merged directive.

Delete Buttons are working, but can’t get reorder / swipe buttons to work.


#4

I tried it again, this time without a merged directive.

The problem was, that the Checkbox got multiple click-events (i think). So the very simple solution was:

   <label class="checkbox">
        <input type="checkbox" ng-click="clickItem(item); $event.stopPropagation();" ng-model="item.checked">
     </label>

And inside clickItem() I just set item.checked.


#5

Nice. You mind creating a sample to share?


#6

Sure.