How to handle the "done" button on an Android application using AngularJS / Ionic?

I am creating a hybrid mobile application using AngularJS, Cordova and Ionic systems.

Here is the Android 5.0 keyboard. Take a look at the blue button in the lower right corner.

enter image description here

I would like to do 2 things:

  • A control that displays the "type" of the button (sometimes it is the "next" button, the "done" button, or the "search" button. The icon changes.)
  • Control the behavior of this button. For example, I sign up and type my name in the first fied. In my case, the default keyboard behavior is to submit a form instead of going to the next field. I would like to control this button to go to the next field.

, , Android- Java-. !

+4
1
.

- . : 13:

$scope.keyPressed = function(keyEvent, formModel) {
    if (keyEvent.keyCode == 13) {
        $scope.formSubmit(formModel);
    }
};

:

ng-click ng-submit. WARN: .

 <form ng-submit="submitLogin()">
  <input id="entry1" ng-model="id_entry"  type="text" >

  <button type="submit" class="button" ng-click="idSubmit()">
  Login</button>
</form>

. . , .

0

All Articles