whats i make wrong, i try import conta page in agenda page!
show me app.module.ts
Whats the name of your class in Conta.ts? I presume you didn’t use the name of the exported class in your import or that you missing something in your app.module.ts.
import { NgModule, ErrorHandler } from '@angular/core';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';
import { agenda } from '../pages/agenda/agenda';
import { home } from '../pages/home/home';
import { conta } from '../pages/conta/conta'
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
@NgModule({
declarations: [
MyApp,
agenda,
home,
conta
],
imports: [
IonicModule.forRoot(MyApp)
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
agenda,
home,
conta
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler}
]
})
export class AppModule {}
is conta really the name of your exported module? Could you post the contents of Conta.ts also? BTW you’re missing some trailing ; on your import statements.
Missing ; after import { conta } from ‘…/pages/conta/conta’
in agenda.ts too: import { conta } from ‘…/pages/conta/conta’ missing ;
But did it fix your error? I think it should only give you some warnings, maybe linting errors.
Semicolons are optional before line breaks. I agree they’re nice to have, but can’t be relevant to the fundamental problem.
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
/**
* Generated class for the Conta page.
*
* See http://ionicframework.com/docs/components/#navigation for more info
* on Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-conta',
templateUrl: 'conta.html',
})
export class Conta {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad Conta');
}
}
Case matters. ‘conta’ != ‘Conta’.
I don’t do screenshots of errors. Please post the error message and the offending code as text.
I do not see any text.
thank you, i found the error. sorry for lost ur time help me.
conta is different Conta… conta != Conta