0
Hello, I’m trying to get the value of an input in Ionic 4, (I’m new in Ionic), follow my code:
Note: I receive as a result: Undefined
html register.:
<ion-header >
<!--<ion-toolbar>
//<ion-title>
//Ionic Blank
//</ion-title>
</ion-toolbar> -->
</ion-header>
<ion-content >
<ion-item class="a">
<ion-label class="flNome" position="floating">NOME</ion-label>
<ion-input [(ngModel)]="title" class="nome" type="text" ></ion-input>
</ion-item>
</ion-content>
register.
import { Component, OnInit } from '@angular/core';
import { EmailComposer } from '@ionic-native/email-composer/ngx';
@Component({
selector: 'app-cadastro',
templateUrl: './cadastro.page.html',
styleUrls: ['./cadastro.page.scss'],
})
export class CadastroPage implements OnInit {
public title: string;
constructor(private emailComposer : EmailComposer ) { }
sendEmail() {
// var local = $("#slc_Local_Reu").val();
let email = {
to: '[email protected]',
cc: '[email protected]',
subject: 'teste',
body: 'NOME:' + this.title,
isHtml: true
};
this.emailComposer.open(email);
}
ngOnInit() {
}
}
Thank you very much guy worked!!
– Dedê miza