Open rbarman opened 9 years ago
If it's something you would use so much that a global config makes sense for you, why not wrap this into your own directive?
<for-against-toggle-switch ng-model="ctrl.model.side" />
I too think this would be a very useful enhancement. Personally I don't know if my angular chops are good enough that I could successfully wrap in my own directive without a $watch
function for each instance.
I agree, I'm converting my checkboxes in my app to this toggle and on one of them I have ng-true-value="false" ng-false-value="true"
for a specific case.
Currently it seems that the possible switch values are true and false. Is it possible to add our own values that are more appropriate to our application?
Below is an example of what would be useful. Note the on-value and off-value fields.
So in this case, the value for the 'On' case is "For" rather than true. Ideally it would be nice to modify the default values for our own applications. Is there a way to do this?