0

I'm an ionic beginner, I'm trying to push user input to Firebase,

in my html file:

<ion-item>
      <ion-label>E-mail </ion-label>
      <ion-input type="email" value="" placeholder="Type your e-mail"></ion-input>
    </ion-item>

I have the inputtext field, but I handle firebase operations in my ts file, how can I send this input value to my ts file so I can push it?

1 Answer 1

2

In the component class file (what you call ts file), you can add a class member, let's call it email:

@Component({
...
})
export class MyComponent {
 private email: string;
}

And you can bind it in your template with ngModel:

<ion-item>
      <ion-label>E-mail </ion-label>
      <ion-input [(ngModel)]="email" type="email" value="" placeholder="Type your e-mail"></ion-input>
</ion-item>
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.