几天前我开始学习使用Ionic 2和Angular 2。但是现在当我运行“
这是我的命令“$ ionic info”的输出:
ionic start myProjectName blank --v2
”命令时,它总是创建一个新的带有v3.0.1 ionic框架的项目。即使我指定了“--v2
”,它也会使用Ionic 3.0.1和Angular 4,但是我想使用Ionic 2和Angular 2,因为我认为对于生产Web应用程序来说使用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.