ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51.07k stars 13.51k forks source link

feat: Angular 8 support #18414

Closed Ketec closed 5 years ago

Ketec commented 5 years ago

With angular 8 released - could we have the dependency version limit increased to allow 8?

godenji commented 5 years ago

Adding TypeScript 3.5 support as well would improve the development experience wrt to incremental builds (which are quite slow on Angular 7.2.x + TS 3.2.x), among other benefits.

eduboxgithub commented 5 years ago

Can we hope for an upgrade on the next version?

kirillgroshkov commented 5 years ago

Can we?

UTSOURCE commented 5 years ago

I tried it and it seems that there are still some problems that need to be solved.

liamdebeasi commented 5 years ago

Hi everyone,

This is something we are looking into! I will update here when I have more to share.

Thanks!

FazioNico commented 5 years ago

Hi everyone.

Have try to update project with angular 8 and ionic 4 but it not work. I get an error

Error in ./node_modules/@ionic/core/dist/esm/es5/ionic.core.js 6:2160
Module parse failed: Unexpected token (6:2160)
You may need an appropriate loader to handle this file type.
|  * Built with http://stenciljs.com
|  */
> function n(n,t){return"sc-

There is my package.json file:

{
  "dependencies": {
    "@angular/animations": "^8.0.0",
    "@angular/common": "^8.0.0",
    "@angular/compiler": "^8.0.0",
    "@angular/core": "^8.0.0",
    "@angular/forms": "^8.0.0",
    "@angular/platform-browser": "^8.0.0",
    "@angular/platform-browser-dynamic": "^8.0.0",
    "@angular/router": "^8.0.0",
    "@ionic/angular": "^4.4.2",
.....
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.800.2",
    "@angular/cli": "8.0.2",
    "@angular/compiler-cli": "~8.0.0",
    "@angular/language-service": "^8.0.0",
    "@ionic/angular-toolkit": "~1.5.1",
......
    "ts-loader": "^4.0.0",
    "ts-node": "^7.0.0",
    "tslint": "~5.11.0",
    "typescript": "3.4.5"
  }
}

Mybee error is coming from incorrect peerdependencie:

 Package "@ionic/angular-toolkit" has a missing peer dependency of "@angular-devkit/architect" @ ">=0.7.2"

Someone have the same issue and have find a solution??

Jbz797 commented 5 years ago

I have updated my project to Angular 8 with "ng update" and i have no problem.

My package.json :

{
  ...,
  "dependencies": {
    "@angular/common": "^8.0.0",
    "@angular/core": "^8.0.0",
    "@angular/forms": "^8.0.0",
    "@angular/platform-browser": "^8.0.0",
    "@angular/platform-browser-dynamic": "^8.0.0",
    "@angular/router": "^8.0.0",
    "@capacitor/android": "^1.0.0",
    "@capacitor/cli": "^1.0.0",
    "@capacitor/core": "^1.0.0",
    "@ionic-native/core": "^5.7.0",
    "@ionic-native/screen-orientation": "^5.7.0",
    "@ionic/angular": "^4.4.2",
    "@ngxs/store": "^3.4.3",
    "cordova-plugin-screen-orientation": "^3.0.1",
    "es6-promise-plugin": "^4.2.2",
    "mapbox-gl": "0.53.1",
    "ngx-mapbox-gl": "^3.1.0",
    "ngx-order-pipe": "^2.0.2",
    "rxjs": "~6.5.1",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular-devkit/architect": "~0.800.1",
    "@angular-devkit/build-angular": "~0.800.0",
    "@angular-devkit/core": "~8.0.1",
    "@angular-devkit/schematics": "~8.0.1",
    "@angular/cli": "~8.0.1",
    "@angular/compiler": "~8.0.0",
    "@angular/compiler-cli": "~8.0.0",
    "@angular/language-service": "~8.0.0",
    "@ionic/angular-toolkit": "~1.5.1",
    "@ngxs/devtools-plugin": "^3.4.3",
    "@types/jest": "^24.0.11",
    "@types/mapbox-gl": "^0.51.7",
    "@types/node": "~12.0.4",
    "cypress": "^3.3.1",
    "jest": "^24.7.1",
    "jest-preset-angular": "7.1.1",
    "stylelint": "^10.0.1",
    "stylelint-config-standard": "^18.3.0",
    "ts-node": "~8.2.0",
    "tslint": "~5.17.0",
    "tslint-config-airbnb": "^5.11.1",
    "typescript": "3.4.5"
  }
}
SimonMacIntyre commented 5 years ago

Hi @Jbz797

That helped me get a little closer to success, but how did you bypass all these warnings? Since I have versions that are newer than 7.2.1 it appears confused.

etc.

It's just a warning, but does your app still function? I'm just in an empty newly initialized app and it is broken.

My package.json:

{
  "name": "ionic-test",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "https://ionicframework.com/",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^8.0.0",
    "@angular/cdk": "^8.0.0",
    "@angular/common": "^8.0.0",
    "@angular/core": "^8.0.0",
    "@angular/forms": "^8.0.0",
    "@angular/material": "^8.0.0",
    "@angular/platform-browser": "^8.0.0",
    "@angular/platform-browser-dynamic": "^8.0.0",
    "@angular/router": "^8.0.0",
    "@ionic-native/core": "^5.7.0",
    "@ionic-native/splash-screen": "^5.0.0",
    "@ionic-native/status-bar": "^5.0.0",
    "@ionic/angular": "^4.4.2",
    "core-js": "^2.5.4",
    "rxjs": "~6.5.1",
    "tslib": "^1.9.0",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular-devkit/architect": "~0.13.8",
    "@angular-devkit/build-angular": "~0.800.2",
    "@angular-devkit/core": "~7.3.8",
    "@angular-devkit/schematics": "~7.3.8",
    "@angular/cli": "~8.0.2",
    "@angular/compiler": "~8.0.0",
    "@angular/compiler-cli": "~8.0.0",
    "@angular/language-service": "~8.0.0",
    "@ionic/angular-toolkit": "~1.5.1",
    "@ionic/lab": "^2.0.1",
    "@types/jasmine": "~2.8.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~12.0.0",
    "codelyzer": "~4.5.0",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.4.0",
    "ts-node": "~8.1.0",
    "tslint": "~5.17.0",
    "typescript": "~3.4.5"
  },
  "description": "An Ionic project"
}
UTSOURCE commented 5 years ago

@

我已经用“ng update”将我的项目更新到Angular 8,我没有问题。

我的package.json:

{
  ...,
  "dependencies": {
    "@angular/common": "^8.0.0",
    "@angular/core": "^8.0.0",
    "@angular/forms": "^8.0.0",
    "@angular/platform-browser": "^8.0.0",
    "@angular/platform-browser-dynamic": "^8.0.0",
    "@angular/router": "^8.0.0",
    "@capacitor/android": "^1.0.0",
    "@capacitor/cli": "^1.0.0",
    "@capacitor/core": "^1.0.0",
    "@ionic-native/core": "^5.7.0",
    "@ionic-native/screen-orientation": "^5.7.0",
    "@ionic/angular": "^4.4.2",
    "@ngxs/store": "^3.4.3",
    "cordova-plugin-screen-orientation": "^3.0.1",
    "es6-promise-plugin": "^4.2.2",
    "mapbox-gl": "0.53.1",
    "ngx-mapbox-gl": "^3.1.0",
    "ngx-order-pipe": "^2.0.2",
    "rxjs": "~6.5.1",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular-devkit/architect": "~0.800.1",
    "@angular-devkit/build-angular": "~0.800.0",
    "@angular-devkit/core": "~8.0.1",
    "@angular-devkit/schematics": "~8.0.1",
    "@angular/cli": "~8.0.1",
    "@angular/compiler": "~8.0.0",
    "@angular/compiler-cli": "~8.0.0",
    "@angular/language-service": "~8.0.0",
    "@ionic/angular-toolkit": "~1.5.1",
    "@ngxs/devtools-plugin": "^3.4.3",
    "@types/jest": "^24.0.11",
    "@types/mapbox-gl": "^0.51.7",
    "@types/node": "~12.0.4",
    "cypress": "^3.3.1",
    "jest": "^24.7.1",
    "jest-preset-angular": "7.1.1",
    "stylelint": "^10.0.1",
    "stylelint-config-standard": "^18.3.0",
    "ts-node": "~8.2.0",
    "tslint": "~5.17.0",
    "tslint-config-airbnb": "^5.11.1",
    "typescript": "3.4.5"
  }
}

Can I use it after executing ionic build --prod?

Ketec commented 5 years ago

The app runs with ionic serve - but cannot build

Error: Could not find the implementation for builder @ionic/angular-toolkit:cordova-build

lgmnemesis commented 5 years ago

Still no support for angular 8 in 4.5.0

liamdebeasi commented 5 years ago

Thanks for the issue! Our goal is to have Angular 8 support added for the next release. We’ll update this issue when something changes.

brandyscarney commented 5 years ago

Angular 8 support has been added in Ionic 4.7.0 Nitrogen! :rocket: Please see the following upgrade guide for steps to update your Ionic Angular apps: https://docs.google.com/document/d/1QOpQeDifPSg6F9WycDLcbQnpqjN96ew-Ap0_CB7CcCQ/edit?usp=sharing

Release notes for 4.7.0 here: https://ionicframework.com/docs/release-notes#4.7.0

There should be no breaking changes if you update Ionic to 4.7.0 and do not update Angular, but there are breaking changes (from Angular) if you update to Angular 8 . The steps in our upgrade guide above should auto-fix them. If you are running into issues with this upgrade, please create a new issue, thank you!