Set values back to default with button
-
Hi all
i would like to change all switch and text input back to default with the button Finish.
While the Button Finish also change the page.any good and simple idea?
-
Use
ng-click
to set all of the values to what you want, then useui-sref
to navigate to a different page view:<ma-button ui-sref="ui.[yourpagestateref]" ng-click=" text1 = 'new value'; sw1.setValue(false); "></ma-button>
Text1 is an ng-model value
sw1 is one of your switch point values. Hope that gives you a good start to work from.or instead of ui-sref add to ng-click:
window.location.href='yourpageurl';
orlocation.url('url')
after all of the values being reset.Fox