nativescript get text by ID code example
Example: get the value of an input nativscript
var view = require("ui/core/view");
function pageLoaded(args) {
var page = args.object;
var textfield= view.getViewById(page, "textfieldID");
}
var text = textField.text;