App not updating on add new page of new function

I’m getting this error when I make a new function after generating a new page

HomePage.html:68 ERROR TypeError: _co.goToSuggestion is not a function
    at Object.eval [as handleEvent] (HomePage.html:68)
    at handleEvent (core.js:13254)
    at callWithDebugContext (core.js:14739)
    at Object.debugHandleEvent [as handleEvent] (core.js:14326)
    at dispatchEvent (core.js:9703)
    at core.js:10317
    at HTMLButtonElement.<anonymous> (platform-browser.js:2614)
    at t.invokeTask (polyfills.js:3)
    at Object.onInvokeTask (core.js:4617)
    at t.invokeTask (polyfills.js:3)

But the error is gone if I stop the present ionic serve and serve again.
I don’t know what the problem is but It is quiet frustrating.

Here are some details about the version I’m using:

Ishan:food apple$ ionic -v
Ishan:food apple$ node -v
Ishan:food apple$ cordova -v

Hi, @IshanMahajan

The Problem happens because I think you have not integrated lazy loading in your project,
When you save your .ts file it will work properly.

Please Integrate lazy loading


I’m using a pre-made template and agree that lazy loading is not being used but I don’t know how to do that moreover I don’t have the time for that.Any way through for that ?

I have a similar problem, when I change and save something in an HTM, with Ionic Serve running as soon as Build finishes the changes do not appear, this is very frustrating since I have to save several times until it changes in Browser.

1 Like