dimanche 29 novembre 2015

Angularjs Accordion behaviour if checkbox inside heading clicked

I have a checkbox in the angularjs accordion heading

<uib-accordion>
        <uib-accordion-group heading="{{group.title}}" ng-repeat="items in itemData">
        <uib-accordion-heading>
        <checkbox ng-model="checkboxModel" ng-click="$event.stopPropagation();"></checkbox>Heading1 <i class="pull-right glyphicon" ng-class="{'glyphicon-menu-down': status.open, 'glyphicon-menu-right': !status.open}"></i>
        </uib-accordion-heading></uib-accordion-group>
        </uib-accordion>

When the checkbox is clicked on the accordion heading, the accordion item is getting expanded, Just want the checkbox to be selected without the accordion action. The accordion expansion should happen only when the heading/arrow is clicked not checkbox selected.

Tried giving this on checkbox tag

$event.stopPropogation()

, but doesnt seem to work.




Aucun commentaire:

Enregistrer un commentaire