2017-11-05 12 views
1

ionicアプリケーションを作成しようとしていて、ionic creatorでページをリンクすると、次のように.tsファイルにエラーが発生します。角度「インポートまたはローカルでなければならない」エラー

以下は
typescript: src/pages/home/home.ts, line: 4 
      Individual declarations in merged declaration 'HomePage' must be all exported or all local. 

     L3: import { NotificationsPage } from '../notifications/notifications'; 
     L4: import { HomePage } from '../home/home'; 
     L5: import { MyPatientsPage } from '../my-patients/my-patients'; 

私.TSファイルからコードです:

import { Component } from '@angular/core'; 
import { NavController } from 'ionic-angular'; 
import { NotificationsPage } from '../notifications/notifications'; 
import { HomePage } from '../home/home'; 
import { MyPatientsPage } from '../my-patients/my-patients'; 
import { AllPatientsPage } from '../all-patients/all-patients'; 
import { LoginPage } from '../login/login'; 

@Component({ 
    selector: 'page-home', 
    templateUrl: 'home.html' 
}) 
export class HomePage { 

    constructor(public navCtrl: NavController) { 
    } 
    goToNotifications(params){ 
    if (!params) params = {}; 
    this.navCtrl.push(NotificationsPage); 
    }goToHome(params){ 
    if (!params) params = {}; 
    this.navCtrl.push(HomePage); 
    }goToMyPatients(params){ 
    if (!params) params = {}; 
    this.navCtrl.push(MyPatientsPage); 
    }goToAllPatients(params){ 
    if (!params) params = {}; 
    this.navCtrl.push(AllPatientsPage); 
    }goToLogin(params){ 
    if (!params) params = {}; 
    this.navCtrl.push(LoginPage); 
    } 
} 

答えて

2

あなたなければならないimportHomePagehome.tsファイル内。 即ちLine 4

import { HomePage } from '../home/home'; 
home.tsファイルからインポート下に除去する必要があります
関連する問題