Upgrade to Angular 5.2 and Angular-CLI 1.7

It’s time to upgrade the application, and it goes with few changes to take in consideration !

For you to get a grasp at the new features of each release of Angular or its CLI, this blog is most interesting: http://blog.ninja-squad.com/tags.html#Angular 5-ref

Steps to do after pulling the new sources

Note: npm has been upgraded to 5.6.0 and yarn to 1.3.2.

  • mise à jour du package @angular/cli en global
npm update -g @angular/cli@1.7.1
  • mise à jour de typescript en global
npm update -g typescript
  • mise à jour des packages locaux (dans répertoire angular)
yarn install

Angular-CLI

Configuration has been updated for this new version. Note that test.ts has also received modifications.

Angular

The new command “ng update” of the latest CLI allows to update all Angular modules, here to version 5.2.6.

In addition, have been updated via “yarn upgrade”:

  • yarn upgrade @angular/material –latest
  • yarn upgrade localize-router –latest
  • yarn upgrade ng-dynamic-component –latest
  • yarn upgrade ng2-google-charts –latest
  • yarn upgrade codelyzer –latest
  • yarn upgrade @angular/cdk –latest
  • yarn upgrade @ngx-translate/core –latest
  • yarn upgrade typescript@~2.5.3
  • yarn upgrade @angular/cdk@5.2.2
  • yarn upgrade tslib@^1.0.0

The 3 last ones are for compatibility with used tools.

Note that because we upgraded Typescript, you might need to upgrade your IDE plugin for Typescript, for it to understand the lattest evolutions (especially the new options in tsconfig.json).

Netbeans user: this way !

New options have been added to the compiler:

  • fullTemplateTypeCheck: true
  • preserveWhitespaces: false

Leave a Reply

Your email address will not be published. Required fields are marked *