Ionic 4 ReferenceError:初始化之前无法访问“ HomePageModule”

时间:2020-11-04 13:03:36

标签: ionic-framework ionic4

我在运行我的应用时出现错误。我想导航到我的主页,但出现此错误:

    ReferenceError: Cannot access 'HomePageModule' before initialization

我知道这可能是循环依赖,但我找不到它。

这是我的HomePage.ts:

    import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { Keyboard } from '@ionic-native/keyboard/';
import { OneSignal } from '@ionic-native/onesignal/ngx';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { Toast } from '@ionic-native/toast';
import { LoadingController, Platform } from '@ionic/angular';
import { Storage } from '@ionic/storage';
import { TranslateService } from '@ngx-translate/core';
import { Notif } from '../model/notif';
import { LanguageServiceProvider } from '../providers/langue-service/language-service';
import { NotificationsServiceProvider } from '../providers/notifications-service/notifications-service';
import { UsersServiceProvider } from '../providers/users-service/users-service';
import { ScreenOrientation } from '@ionic-native/screen-orientation';
import { Content } from '@angular/compiler/src/render3/r3_ast';

@Component({
  selector: 'app-home',
  templateUrl: './home.page.html',
  styleUrls: ['./home.page.scss'],
})
export class HomePage implements OnInit {

  @ViewChild("content", {static: false}) content : Content;
  notificationsDisplay: Notif[] = [];
  notificationsAll: Notif[] = [];
  basePathImg: string;
  start: number = 0;
  limit: number = 20;
  refreshLimit: number = 3;
  badge: number = 0;
  show: boolean = false;
  end: boolean = false;
  resumed: boolean = false;
  isSearchbarOpened = false;
  orientation : string;
  subOrientation;
  searchvalue;
  infiniteScroll;

  constructor(public router: Router,
    public notifProvider: NotificationsServiceProvider,
    public usersProvider: UsersServiceProvider,
    public storage: Storage,
    public translate: TranslateService,
    public loading: LoadingController,
    public platform: Platform,
    public onesignal: OneSignal,
    private keyboard : Keyboard,
    public screenOrientation : ScreenOrientation,
    private toast: Toast,
    public splashScreen : SplashScreen,
    public languageprovider : LanguageServiceProvider) {

有人知道它的来源吗?我的应用在离子4和角度10上。

0 个答案:

没有答案