Looking to create a directive for a toggle button, here is the code I want to include in the directive:
<div class="toggle-button" ng-class="{true: toggleTrue === true, false: toggleTrue === false}">
<button class="true" ng-click="toggleTrue = true">Y</button><button class="false" ng-click="toggleTrue = false">N</button>
</div>
(My focus is on style changes only, hence only the class change)
I am hoping for something like:
<toogle ng-change="SomeFunction()" ng-model="someValue" />
How can I utilize ng-change in my directive? Should I simply parse the attribute or use a scope attribute, or is there a code similar to ngModel that needs to be used in conjunction with ngChange.