-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Ionic 3.0.0-beta.3] TypeError: undefined is not a function #10977
Comments
I'm betting this error comes because of my child-components and pipes not properly loaded. Gonna try to improve that according @mhartington nice answer https://forum.ionicframework.com/t/ionic-3-0-0-beta/84540/57 |
So just to add a bit here. In your root ngModule, you have
Were you include So
Will not work. |
@mhartington Thx for the answer. Yep if I import the "login" component like I did before lazy-loading was introduce, this component is loaded. But once that page is displayed, if I call from there another page with the page name to lazy load it, I face the error.
=> Uncaught (in promise): TypeError: undefined is not a function I guess I get that error because the page could not be compiled on the fly, which is most probably due to a mistake from my side, but who knows...if I found the solution, of course gonna close the issue asap. |
Well I converted the starter-app the same way I converted my app and everything's worked. Also added sub-component in the starter app the same way I converted my sub-component, still worked....weird |
Same error: ionic-team/ionic-app-scripts#848 |
The fix applied by @danbucholtz in the linked issue of app-scripts solved my issue, thx a lot! |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Ionic version: (check one with "x")
[ ] 1.x
[ ] 2.x
[ X] 3.x
I'm submitting a ... (check one with "x")
[ X] bug report
Current behavior:
First I report most probably a bug, I won't say it's one but I really I really spent hours to be sure I followed correctly the upgrade guides and examples.
When I set the root page, push, setRoot, modal.create a page with her string value (like nav.push('LoginPage') instead of nav.push(LoginPage)) I always end up facing following error:
Expected behavior:
Well no error ;)
Steps to reproduce:
Like I said, in every navigation with string value I face the above reported error
Related code:
If you wish, I could grant you access to my private project repo.
Note also that that error was previously reported there: #10961
My app.module.ts:
})
export class AppModule {
}
LoginPageModule:
app.component.ts:
or in another page
= same results
Your system information:
Cordova CLI: 6.5.0
Ionic Framework Version: 3.0.0-beta.3
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.2.2
ios-deploy version: 1.9.0
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v7.2.1
Xcode version: Xcode 8.3 Build version 8E162
The text was updated successfully, but these errors were encountered: