How to fire click event programmatically in Ionic?

Helo community.

I want to trigger programmatically in Ionic a click event on a Ionic button:

.<button id=“facebookLogin” ion-button color=“facebook” full (click)=“signInWithOAuth(‘Facebook’)”>

I tried with JQuery:


I tried to fire a Mouse with Javascript:

I tried to do like in Angular 2

I get no error. Just the event is not triggered (it is swallowed by the Ionic button)
Any idea how can I do this?
I use Ionic 3.12.0

1 Like

Why don’t you just execute the signInWithOAuth('Facebook") function from your code?