Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

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.

    0_1590474439127_Comp page.JPG

    any good and simple idea?


  • Use ng-click to set all of the values to what you want, then use ui-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'; or location.url('url') after all of the values being reset.

    Fox