离子2释放迁移 - >提供商错误

时间:2016-10-05 09:43:28

标签: angular ionic-framework ionic2

当我尝试创建包含提供程序的页面组件时,页面为空,并显示以下错误: 未捕获错误:无法解析BackgroundPicturePage的所有参数:(LoadingController,AlertController,NavController,?,TranslateService)。

以下是我的文件:

app.module.ts:

import { User } from '../models/User';

......

providers: [
    User,
],

背景picture.component.ts:

import {Component} from '@angular/core';
import {User} from '../../models/User';

@Component({
  templateUrl: 'background-picture.html',
})
export class BackgroundPicturePage {
  constructor(
    public loadingCtrl: LoadingController,
    public alertCtrl: AlertController,
        public nav: NavController,
        public user: User,
        public translate: TranslateService
    ) {
    }
}

我的系统信息:

Cordova CLI: 6.3.1
Gulp version:  CLI version 3.9.1
Gulp local:  
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v6.3.0
Xcode version: Xcode 8.0 Build version 8A218a 

0 个答案:

没有答案