ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51.01k stars 13.51k forks source link

This is a question about page jumps #12986

Closed Overflowhiddenno closed 7 years ago

Overflowhiddenno commented 7 years ago

I set up a tabs page, A, B, C. like this: tab1Root: any = HomePage; tab2Root: any = AboutPage; tab3Root: any = ContactPage; When I jump from PageB to a new pageC The URL becomes :“http://localhost:8102/#/about/shopping”; when I reload the shopping page,I have a error: Component AboutPage is not part of any NgModule or the module has not been imported into your module. I'm newcomer, hold someone can help me; here are my code: `about.ts:

import { Component } from '@angular/core'; import { IonicPage, NavController, NavParams } from 'ionic-angular';

@IonicPage() @Component({ selector: 'page-about', templateUrl: 'about.html', }) export class AboutPage { lists = Lists constructor(public navCtrl: NavController, public navParams: NavParams) { }

ionViewDidLoad() {

} openPage(page){ this.navCtrl.push(page) } }

about.module.ts

import { NgModule } from '@angular/core'; import { IonicPageModule } from 'ionic-angular'; import { AboutPage } from './about';

@NgModule({ declarations: [ AboutPage, ], imports: [ IonicPageModule.forChild(AboutPage), ], }) export class AboutPageModule {}

`

kensodemann commented 7 years ago

Hello! Thank you for opening an issue with us! As this seems like more of a support question I will urge that you ask this question on our forum or on our slack channel. Thanks for using Ionic!

ionitron-bot[bot] commented 6 years ago

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.