How to update angular version 6.0.0

How to update angular version 6.0.0

In this post we will show you How to update angular version 6.0.0, hear for How to update angular version 6.0.0 we will give you demo and example for implement.

Version 6 of Angular has been released Official Angular blog link. I have mentioned general upgrade steps below, but before and after the update you need to make changes in your code to make it workable in v6, for that detailed information visit official website .

How to update angular version 6.0.0
How to update angular version 6.0.0

Upgrade Steps :
  1. Make sure NodeJS version is 8.9+ if not update it.
  2. Update Angular cli globally and locally, and migrate the old configuration .angular-cli.json to the new angular.json format by running the following :

    npm install -g @angular/cli
    npm install @angular/cli
    ng update @angular/cli

  3. Update all of your Angular framework packages to v6,and the correct version of RxJS and TypeScript by running the following:

    ng update @angular/core

  4. Update Angular Material to the latest version by running the following:

    ng update @angular/material

  5. RxJS v6 has major changes from v5, v6 brings backwards compatibility package rxjs-compat that will keep your applications working, but you should refactor TypeScript code so that it doesn’t depend on rxjs-compat. To refactor TypeScript code run following:

    npm install -g rxjs-tslint
    rxjs-5-to-6-migrate -p src/

    Note :- Once all of your dependencies have updated to RxJS 6, remove rxjs- compat as it increases bundle size. please see this RxJS Upgrade Guide for more info.

    npm uninstall rxjs-compat

  6. Done run ng serve to check it.
    If you get errors in build refer for detailed info.

The update generally follows 3 steps, and will take advantage of the new ng update tool.

  • Update @angular/cli
  • Update your Angular framework packages
  • Update other dependencies

Making it easy for developers to stay up to date with the latest releases is extremely important to us, so let us know what you think about this release in the comments!

Hope this code and post will helped you for implement How to update angular version 6.0.0. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve onlincode. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs

Leave a Comment

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

  +  13  =  15

We're accepting well-written guest posts and this is a great opportunity to collaborate : Contact US