I have a property name
var viewModel = observableModule.fromObject({
name: "abcd",
onUsernameChanged: function () {
console.log("-->"+ viewModel.name)
}
});
textfield like below,
<TextField text="{{name}}" textChange="{{ onUsernameChanged }}"
class="h2 description-label" />
When I change the text by typing, It always prints --->abcd only.
Why the viewmodel property is not updated ?
currently I'm reading the changed text like below, And this method is not flexible and easy to use like viewmodel
var view = require("ui/core/view");
var idUsername = view.getViewById(args.object, "idUsername");