2

I'm using this example to understand the operation between ionic and php with mysql But I find that this error appears to me and I do not understand where it comes from. The strange thing is that when I load a note it works and it is loaded into the database.

Error enter image description here

He left the repository in case they want to visualize the code https://github.com/javazika/ionic_crud_php_msqyl

enter image description here

Console enter image description here

1 Answers1

2

You need to run the ionic serve command through CMD / Terminal while in your project directory.

This transpiles your TypeScript and builds your app to make it runnable on your device, as per the description from the documentation:

Start a local dev server for app dev/testing

Easily spin up a development server which launches in your browser. It watches for changes in your source files and automatically reloads with the updated build.

It has live-reload capabilities built into it so you can edit the code on-the-fly and see those changes, once you make a change, look in the console, it should say rebuilding / compiling. That is the TypeScript being transpiled (again) to JavaScript.

Once you run the command it'll open up a port on localhost and automatically open your app in the browser.

Script47
  • 14,230
  • 4
  • 45
  • 66
  • Thank you! I already understand a little better the functioning of ionic. and thanks add @deceze `` and the console error disappears – Matias Angeluk Dec 05 '18 at 13:54