使用"离子启动创建新项目#appName#blank --v2 --ts"命令。 所以它显示
"dependencies": {
"@angular/common": "^2.0.0-rc.1",
"@angular/compiler": "^2.0.0-rc.1",
"@angular/core": "^2.0.0-rc.1",
"@angular/http": "^2.0.0-rc.1",
"@angular/platform-browser": "^2.0.0-rc.1",
"@angular/platform-browser-dynamic": "^2.0.0-rc.1",
"@angular/router": "^2.0.0-rc.1",
在package.json中。
使用旧版本的ionic2创建新项目的命令是什么,以便得到" angular2"而不是" @ angular"并且可以使用旧的RouteConfig
答案 0 :(得分:0)
我将此配置用于ionic2 beta 5版本。
"dependencies": {
"angular2": "2.0.0-beta.15",
"es6-shim": "^0.35.0",
"ionic-angular": "2.0.0-beta.5-201604211454",
"ionic-native": "^1.1.0",
"ionicons": "3.0.0-alpha.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"zone.js": "^0.6.11"
},
"devDependencies": {
"del": "2.2.0",
"gulp": "3.9.1",
"gulp-watch": "4.3.5",
"ionic-gulp-browserify-es2015": "^1.0.2",
"ionic-gulp-fonts-copy": "^1.0.0",
"ionic-gulp-html-copy": "^1.0.0",
"ionic-gulp-sass-build": "^1.0.0",
"ionic-gulp-scripts-copy": "^1.0.0",
"run-sequence": "1.1.5"
}
你必须从node_modules文件夹中删除所有文件,从上面用config更改package.config文件并运行npm install 但你必须考虑到这是离子(beta5)和角度的旧版本。我的建议是使用最新版本