7
没有Http StaticInjectorError提供程序
我试图从api中提取数据,并在ionic应用程序中填充它,但是当我进入应该填充数据的页面时,它崩溃了。以下是我的两个.ts文件: import { Component } from '@angular/core'; import { NavController, LoadingController } from 'ionic-angular'; import { RestService } from '../../providers/rest-service/rest-service'; @Component({ selector: 'page-all-patients', templateUrl: 'all-patients.html', providers: [RestService] }) export class AllPatientsPage { data: any; loading: any; constructor(public navCtrl: NavController, public restService: RestService, public loadingCtrl: LoadingController) { this.loading = this.loadingCtrl.create({ content: …