Launch Ionic 2 with Angular 2

A few days ago, I started playing with Ionic 2 and Angular 2, but now, when I start " ionic start myProjectName blank --v2", it always creates a new project with an ion map v3.0.1. Even if I specify " --v2", it uses Ionic 3.0.1 and Angular 4, but I want to use Ionic 2 with Angular 2 because I think it's too early to use Ionic 3 and Angular 4 to produce web applications.

Here is my "$ ionic info" command:

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

and my package.json dependency 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"
  },

[Edit] I also ask a question on the Ionic forum if this cloud helps someone else. Thanks a lot https://forum.ionicframework.com/t/ionic-2-with-angular2/86072/2 .

+4
2

2.x CLI - --v2 (3.0.1 ). - (3.0.0-beta.5 - ) CLI, , (3.0.1).

v2 (2.2.0 2.3.0, ) . 1, 3.0.0.

+5

package.json

"dependencies": {
  "@angular/common": "2.4.8",
  "@angular/compiler": "2.4.8",
  "@angular/compiler-cli": "2.4.8",
  "@angular/core": "2.4.8",
  "@angular/forms": "2.4.8",
  "@angular/http": "2.4.8",
  "@angular/platform-browser": "2.4.8",
  "@angular/platform-browser-dynamic": "2.4.8",
  "@angular/platform-server": "2.4.8",
  "@ionic/storage": "2.0.0",
  "ionic-angular": "2.2.0",
  "ionic-native": "2.8.1",
  "ionicons": "3.0.0",
  "rxjs": "5.0.1",
  "sw-toolbox": "3.4.0",
  "zone.js": "0.7.2"

},

>_ npm install

0

Source: https://habr.com/ru/post/1674531/


All Articles