我是一个新手,面对的问题,你可以读到的标题。
在我应用程序.模块.ts中:
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { IonicSelectableModule } from 'ionic-selectable';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { HttpClientModule } from '@angular/common/http';
import { Geolocation } from '@ionic-native/geolocation/ngx';
import { NativeGeocoder } from '@ionic-native/native-geocoder/ngx';
import { AccessProviders } from './providers/access-providers';
import { dataService } from './providers/service';
import { NgxIonicImageViewerModule } from 'ngx-ionic-image-viewer';
import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';
import { FormsModule } from '@angular/forms';
import { Clipboard } from '@awesome-cordova-plugins/clipboard/ngx';
import { FingerprintAIO } from '@ionic-native/fingerprint-aio/ngx';
@NgModule({
declarations: [AppComponent],
imports: [NgxIonicImageViewerModule, FormsModule, BrowserModule, IonicModule.forRoot(), AppRoutingModule, HttpClientModule, IonicSelectableModule, ],
providers: [Clipboard, BarcodeScanner, Geolocation, NativeGeocoder, AccessProviders, dataService, { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],
bootstrap: [AppComponent],
})
export class AppModule {}
当我运行离子服务时,页面看起来就是空白的。
然后控制台中出现控制台黑色文本:
类型错误:无法读取新NgModuleRef(core.mjs:21731:28)上R3注入器(core. mjs:6859:24)上提供器到工厂(core.mjs:6994:24)上提供器到记录(core.mjs:6956:25)上每个单一提供器(core.mjs:7030:13)上核心.mjs:6690:59上每个单一提供器(core. mjs:7027:13)上未定义的属性(阅读“hasOwnProperty”),新NgModuleRef(core. mjs:21731:28)上创建注入器示例(core. mjs:9998:12)上创建注入器示例(core.mjs:9998:12)
谦卑地等待解决方案。
1条答案
按热度按时间wqsoz72f1#
您需要将其添加到提供程序中:[],因此您将得到如下内容:提供程序:[剪贴板,条形码扫描仪,地理定位,本地地理编码器,访问提供程序,数据服务,{提供:路由重用策略,useClass:离子路由策略}、指纹AIO]、