我只是关注离子文档在应用上设置Ionic Deploy但我仍然收到此错误:无法找到名称'部署' 。 随后的说明:http://docs.ionic.io/services/deploy/ 我在主要组件(app.component.ts)中的代码:
import { Component, ViewChild } from '@angular/core';
import { Deploy } from '@ionic/cloud-angular';
import { Nav, Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { HomePage } from '../pages/home/home';
import { EventPage } from '../pages/event/event';
import { LoginPage } from '../pages/login/login';
import { ProfilePage } from '../pages/profile/profile';
import { AuthService } from '../services/auth.service';
import { UpcomingEventsPage } from "../pages/upcoming-events/upcoming-events";
import { CoursesService } from "../services/courses.service.";
@Component({
templateUrl: 'app.html'
})
export class MyApp {
@ViewChild(Nav) nav: Nav;
availableUpdate: boolean = false;
rootPage: any = HomePage;
loading: boolean = false;
pages: Array<{ title: string, component: any, params: any }>;
constructor(
public platform: Platform,
public statusBar: StatusBar,
public splashScreen: SplashScreen,
public coursesService: CoursesService,
private authService: AuthService
,public deploy: Deploy
) {
this.initializeApp();
答案 0 :(得分:1)
只需要安装先决条件:angular-cloud。