How can i get the value from the keyboard


#1

I’m trying to get the value from keyboard which popped by "cordova.plugins.Keyboard.show();"
I have no input or textarea element in my page and the keyboard is not popped by a focus event with a input text element

forgive my poor English


#2

You can do that using angular and ng-model

<textarea  ng-model="text" name="textarea" ></textarea>

In your controller you can use the variable $scope.text to get the value from the keyboard


#3

I have no textarea in my page


#4

It’s not clear what you want to do :smiley:
Can you explain it again?


#5

I invoke “cordova.plugins.Keyboard.show()” when I trigger a press gesture on my page, there’s no textarea


#6

sorry for the delay but you could create an hidden testarea(in the current view) and add an ng-click where you can process your input as you want into the controller

<textarea  ng-model="text" name="textarea" ng-click="doSomenthig()"></textarea>

what do you think?


#7

did you find a solution for this problem?