【问题标题】:Is it possible to use Ionic 4 inside an Angular 8 project using ng serve? [closed]是否可以使用 ng serve 在 Angular 8 项目中使用 Ionic 4? [关闭]
【发布时间】:2019-09-02 21:54:26
【问题描述】:

是否可以使用 ng serve 命令启动使用 Ionic 4 组件的 Angular 8 应用程序?

我尝试设置一个全新的 Angular 8 应用程序,然后安装了 Ionic 4 框架。现在我想使用 ng serve 使用 Ionic 4 组件启动应用程序。有没有可能?

这是我的依赖项:

    "@angular/animations": "^8.2.3",
    "@angular/common": "^8.2.3",
    "@angular/compiler": "^8.2.3",
    "@angular/core": "^8.2.3",
    "@angular/forms": "^8.2.3",
    "@angular/platform-browser": "^8.2.3",
    "@angular/platform-browser-dynamic": "^8.2.3",
    "@angular/router": "^8.2.3",
    "@angular/upgrade": "^8.2.3",
    "@ionic-native/core": "^5.12.0",
    "@ionic-native/splash-screen": "^5.12.0",
    "@ionic-native/status-bar": "^5.12.0",
    "@ionic/angular": "^4.8.1",

【问题讨论】:

    标签: angular ionic-framework


    【解决方案1】:

    是的,离子 cli 大多只是围绕 angular cli 命令。任何 ionic 项目都可以使用 ng 命令以及 ionic 运行 - 它是具有附加逻辑的构建脚本,因此如果您想充分利用这些,您必须修改您的 angular.json 文件以添加相关绑定.最简单的方法是从 ionic starter 项目中复制。

    您可以在 Angular 7 的类似问题中查看完整步骤:Ionic framework in existing Angular 4 project

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-02-07
      • 2019-12-27
      • 1970-01-01
      • 2019-05-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多