jQuery UI Widgets Forums General Discussions How to refresh a form in JQWidget with AngularJS

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 9 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • Kavyad23
    Participant
    <!DOCTYPE html>
    <html ng-app="OrderBookApp">
    <head>
    <link rel="stylesheet" href="css/jqx.base.css" type="text/css" />
    <link rel="stylesheet" href="css/OrderBook_ngJS.css"
    	type="text/css" />
    <script type="text/javascript" src="js/import.js"></script>
    <script type="text/javascript" src="js/OrderBook_ngJS.js"></script>
    </head>
    <body>
    	<div ng-controller="ForexOrderBookController">
    		<form>
    					<jqx-label class="formlabel">From Date</jqx-label>
    					<jqx-date-time-input jqx-settings="dateSettings" class="TextArea"
    						ng-modal="orderBook.fromdate"></jqx-date-time-input>
    				
    				
    					<jqx-label class="formlabel" style="width: 80px;">Currency
    					Pair</jqx-label>
    					<jqx-drop-down-list jqx-settings="curpairDropDown"
    						class="selectList" ng-modal="orderBook.curpair"></jqx-drop-down-list>
    				
    						<jqx-button jqx-on-click="" jqx-data="resetButton"
    							jqx-settings="btnsettings" class="btn"
    							style="float: right;margin-right: 60px;" ng-click="resetForm()">Reset</jqx-button>
    			</form>
    	</div>
    </body>
    </html>

    JS file

    $scope.orderBook = {
    		fromdate : "",
    		curpair : "",
    		
    	};
    	$scope.resetForm = function() {
    		$scope.orderBook= "";
    	};

    How to reset a form? I call resetform() function when button click, in that function, orderbook is “”. but its not clearing.


    Peter Stoev
    Keymaster

    Hi Kavyad23,

    1. Each widget has method for resetting its value and selection.
    2. Please, post your future questions about AngularJS in our AngularJS Forum. The “General Discussions” Forum is about general questions.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.