Skip to content

Broken ionic 3.0.0-beta.3 #10961

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

Closed
maitbayev opened this issue Mar 29, 2017 · 11 comments
Closed

Broken ionic 3.0.0-beta.3 #10961

maitbayev opened this issue Mar 29, 2017 · 11 comments

Comments

@maitbayev
Copy link

Ionic version: (check one with "x")
[ ] 1.x
[ x ] 2.x
[ x ] 3.0.0-beta.3

I'm submitting a ... (check one with "x")
[ x ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

  1. Why ListPageModule isn't declared in https://github.com/driftyco/ionic2-starter-sidemenu/blob/3/src/app/app.module.ts and works without an issue?
  2. Why it doesn't work when it's declared?

Error I am getting:
TypeError: undefined is not a function
at Array.map (native)
at webpackAsyncContext (http://localhost:8100/build/main.js:44886:34)
at loadAndCompile (http://localhost:8100/build/main.js:76930:35)
at NgModuleLoader.load (http://localhost:8100/build/main.js:76895:83)
at ModuleLoader.load (http://localhost:8100/build/main.js:56145:44)
at DeepLinker.getNavLinkComponent (http://localhost:8100/build/main.js:31057:39)
at DeepLinker.getComponentFromName (http://localhost:8100/build/main.js:31040:25)
at getComponent (http://localhost:8100/build/main.js:33516:23)
at convertToView (http://localhost:8100/build/main.js:33534:16)
at NavControllerBase.push (http://localhost:8100/build/main.js:43538:103)
at Nav.ngAfterViewInit (http://localhost:8100/build/main.js:49795:25)
at callProviderLifecycles (http://localhost:8100/build/main.js:11382:18)
at callElementProvidersLifecycles (http://localhost:8100/build/main.js:11357:13)
at callLifecycleHooksChildrenFirst (http://localhost:8100/build/main.js:11341:17)
at checkAndUpdateView (http://localhost:8100/build/main.js:12359:5)

@Manduro
Copy link
Contributor

Manduro commented Mar 29, 2017

@jgw96
Copy link
Contributor

jgw96 commented Mar 29, 2017

Hello @maitbayev , would you mind posting an example of your issue please? I think i understand the issue here, but I would love if you could show an example.

@maitbayev
Copy link
Author

maitbayev commented Mar 29, 2017

Generate SideMenu template from branch 3.0. Modify src/app/app.module.ts to reflect changes below and run "ionic serve".

@jgw96 Feel free to clarify.

import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';

import { MyApp } from './app.component';
import { HomePageModule } from '../pages/home/home.module';
*****import { ListPageModule } from '../pages/list/list.module';*****

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';

@NgModule({
  declarations: [
    MyApp
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp),
    HomePageModule,
    *****ListPageModule*****
  ],
  bootstrap: [IonicApp],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ]
})
export class AppModule {}

@maitbayev
Copy link
Author

maitbayev commented Mar 30, 2017

Oops, its updated. Seems like to lazy load we shouldn't declare. We need to declare if the component is loaded. Thanks

@peterpeterparker
Copy link
Contributor

@maitbayev what what what? I've got the same error right now, could you elaborate a bit?

@maitbayev
Copy link
Author

maitbayev commented Mar 30, 2017

@peterpeterparker are you adding your generated modules to "imports" in app.module.ts and trying to navigate with string name?

@peterpeterparker
Copy link
Contributor

@maitbayev yep, I only import one module in import (the first page of the app) and I converted all my push, setRoot and modal.create to use string names

@maitbayev
Copy link
Author

maitbayev commented Mar 30, 2017

@peterpeterparker I think the first page should not use a string name. See: ionic-team/ionic2-starter-sidemenu@818d0ed

@peterpeterparker
Copy link
Contributor

@maitbayev I think you are right but I don't understand why it's working in the conference-app (see https://github.com/driftyco/ionic-conference-app/blob/lazy-load/src/app/app.component.ts)

anyway that didn't solve my issue :( I've got the feeling I may have some problems with the loading of the child-/sub-components

@peterpeterparker
Copy link
Contributor

I opened a new issue because I was unable to solve it

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 3, 2018

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants