gpt4 book ai didi

angular - 使用 Angular 2 运行 Ionic 2

转载 作者:太空狗 更新时间:2023-10-29 17:50:06 26 4
gpt4 key购买 nike

几天前我开始使用 Ionic 2 和 Angular 2,但现在当我运行“ionic start myProjectName blank --v2”时,它总是使用 v3.0.1 ionic 创建一个新项目框架。即使我指定“--v2”,它也使用 Ionic 3.0.1 和 Angular 4,但我想将 Ionic 2 与 angular 2 一起使用,因为我认为现在使用 Ionic 3 和 Angular 4 还为时过早生产网络应用程序。

这是我的命令“$ ionic info”输出:

Your system information:

Cordova CLI: 6.5.0
Ionic Framework Version: 3.0.1
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: macOS Sierra
Node Version: v6.10.0
Xcode version: Not installed

和我的 package.json 依赖 block :

 "dependencies": {
"@angular/common": "4.0.0",
"@angular/compiler": "4.0.0",
"@angular/compiler-cli": "4.0.0",
"@angular/core": "4.0.0",
"@angular/forms": "4.0.0",
"@angular/http": "4.0.0",
"@angular/platform-browser": "4.0.0",
"@angular/platform-browser-dynamic": "4.0.0",
"@ionic-native/core": "3.4.2",
"@ionic-native/splash-screen": "3.4.2",
"@ionic-native/status-bar": "3.4.2",
"@ionic/storage": "2.0.1",
"ionic-angular": "3.0.1",
"ionicons": "3.0.0",
"rxjs": "5.1.1",
"sw-toolbox": "3.4.0",
"zone.js": "^0.8.4"
},

[编辑]如果此云对其他人有帮助,我还会在 Ionic 论坛中发布问题。非常感谢https://forum.ionicframework.com/t/ionic-2-with-angular2/86072/2 .

最佳答案

ionic blog

据此,

Using version 2.x of the CLI still requires the --v2 flag to create an app using the latest version of the framework (3.0.1 currently). If you are using the beta (3.0.0-beta.5 is latest) version of the CLI it does not require any flag and will generate an app using the latest version of the framework (3.0.1).

So creating a new app using latest v2 framework (2.2.0 or 2.3.0 I think) is no longer possible. It's either 1.. or 3.0.0 now.

关于angular - 使用 Angular 2 运行 Ionic 2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43335235/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com