• Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular

    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

    How-To
    2
    2
    284
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      RonnyHinkel last edited by RonnyHinkel

      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?

      1 Reply Last reply Reply Quote 0
      • MattFox
        MattFox last edited by MattFox

        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

        Do not follow where the path may lead; go instead where there is no path.
        And leave a trail - Muriel Strode

        1 Reply Last reply Reply Quote 0
        • First post
          Last post