通过单击按钮交换两个文本框值 Ionic(角度)



如何使用 Ionic 中的按钮交换文本框 1 和文本框 2 中的文本

    //add two ng-models for both textboxes
//Assign the values to variables
var txt1 = $scope.textbox1 ;
var txt2 = $scope.textbox2;
//swap the values 
$scope.textbox1 = txt2;
$scope.textbox2 = txt2;

最新更新