Hi, I’m new in Ionic and I’m facing a very strange situation here which I don’t know if it is a bug or if I need to do some kind of configuration.
The problem is so odd that is hard to even explain, but I will try.
Let’s say that I create a page named ‘page1’ which generate the files page1.html, page1.ts, page1.module.ts and page1.scss. I start the ionic serve I write some code in page1.ts and page1.html. I save the HTML file and then after the TS file. ionic serve refresh the app in the browser with my modifications and everything goes OK. But if I go to the HTML file and just pres CTRL-S to save it with no modification, ionic serve updates the app on the browser then I got a reference error, this error can be anything, a function or variable that exists on TS file and the HTML file just don’t recognize it anymore, then I go to TS file and press CTRL-S again to save it with no modification, ionic serve reloads the app and now it works again.
Summing up, if I save the HTML file to force a reload I got an error, if I save the TS file to force a reload the app works.
The problem is that my project is growing up and now I have to pay attention in the sequence which I save the files, because looks like that if the HTML file of a page or component is saved after the TS file I got an error.
It is very annoying and improductive situation.
Is there anyone that face a problem like that? What can I do here to solve it?
Following some environment information:
Ionic version: 3.19.1
NPM version: 5.6.0
Angular CLI: 1.6.7
Node: 9.5.0
OS: win32 x64
Cordova: 8.0.0
Phonegap: 7.1.1
Visual Studio Code: 1.20
Thank you very much.