【发布时间】:2017-04-11 01:19:20
【问题描述】:
几天前我开始使用 Ionic 2 和 Angular 2,但现在当我运行“ionic start myProjectName blank --v2”时,它总是使用 v3.0.1 离子框架创建一个新项目。即使我指定“--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 依赖块:
"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。
【问题讨论】:
-
不用道歉,你的英文很好。此外,Angular 2/Ionic 2 与 Angular 4/Ionic 3 之间“几乎”没有区别,没有理由不使用最新版本,除非您有坚持使用较低版本的组件。
标签: angular ionic-framework ionic2