How to use javascript in Ionic3?

How can i use javascritp in Ionic?

Can you be more specific?

Hi have to use EmaiJs or Smtpjs in Ionic … but i don’t know how to use it… an error occured when i try to run my app

Please provide us your code where we can see:

  1. what you already have tried
  2. what error message do you get
  3. information about your envrioment

In home.html i have a form where i call function => sendEmail()

this is the funciont in file home.ts : =>

and finally this is the Error =>

Ok then your JS Plugin isnt the problem. You are somehow calling your sendEmail wrong.
Can you please show the form where you call your function?

Ah I see your are calling it by click event.
Do you call it like this? because this is the ionic way of calling functions:


In vanilla JS you would do it like this:



i imported javascript file in index.html

In this picture i included the console to

I solved :smiley: i missed to write a thing.