import { Component } from "@angular/core" ; import { TextField , Utils } from "@nativescript/core" ; @ Component ( { moduleId : module . id , templateUrl : "./usage.component.html" } ) export class UsageComponent { name = "" ; onReturnPress ( args ) { let textField = < TextField > args . object ; console . log ( textField . hint ) ; console . log ( textField . text ) ; console . log ( textField . secure ) ; console . log ( textField . keyboardType ) ; console . log ( textField . returnKeyType ) ; console . log ( textField . autocapitalizationType ) ; console . log ( textField . updateTextTrigger ) ; console . log ( textField . editable ) ; console . log ( textField . autocorrect ) ; console . log ( textField . maxLength ) ; Utils . setTimeout ( ( ) => { textField . dismissSoftInput ( ) ; } , 100 ) ; } onFocus ( args ) { let textField = < TextField > args . object ; } onBlur ( args ) { let textField = < TextField > args . object ; } }