【发布时间】:2016-12-23 19:19:42
【问题描述】:
我在我的ionic 2 项目中导入了Alert Component,如下所示:
import {Alert } from 'ionic-angular';
用法:
let alert = this.alert.create({
title: 'New Friend!',
subTitle: 'Your friend, Obi wan Kenobi, just accepted your friend request!',
buttons: ['OK']
});
alert.present();
但我的错误是: Property create does not exist on type Alert.
离子信息:
Cordova CLI: 6.3.0
Gulp version: CLI version 1.2.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.10
Ionic CLI Version: 2.0.0-beta.37
Ionic App Lib Version: 2.0.0-beta.20
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v5.12.0
Xcode version: Xcode 7.3 Build version 7D175
我该如何解决?
【问题讨论】:
标签: components alert ionic2