has released its latest version, 6.0. In this article, we will look at the new of 6.0 and also set up a new project with the help of CLI 6.0 and Visual Studio Code.

What’s New in Angular 6.0?

  • ng update: A new CLI command that will update your project dependencies to their latest versions.
  • ng add: Another new CLI command that will make adding new capabilities to your project easier.
  • Angular Elements: This is a new feature that allows us to compile Angular components to native web components which we can use in our Angular app.
  • <template> element is deprecated: You can’t use <template> anymore inside of your component templates. You need to use <ng-template> instead.
  • Angular CLI now has support for and building libraries. To create a library project within your CLI workspace, run the following command:
    • ng generate library <name>
    • For example:ng generate library my-demo-lib  
  • Angular Material Starter Components: If you run ng add @angular/material to add material to an existing application, you will also be able to generate three new starter components.
  1. Material Sideman A starter component including a toolbar with the app name and the side navigation.
  2. Material Dashboard A starter dashboard component containing a dynamic grid list of cards.
  3. Material Table A starter data table component that is pre-configured with a datasource for sorting and pagination.
  • Angular CLI now has support for workspaces containing multiple projects, such as multiple applications and/or libraries.
  • The ".angular-cli.json" has been deprecated. Angular projects will now use "angular.json" instead of ".angular-cli.json" for build and project configuration.
  • Angular 6 will also allow us to use RxJS V6 with our application.
  • Tree Shakable Providers: Angular 6.0 allows us to bundle services into the code base in modules where they are injected. This will help us to make our application smaller.
  • For example, in previous Angular versions, we used to reference our services as below:

    Source link
    thanks you RSS link
    ( https://dzone.com/articles/getting--with-angular-?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev)


    Please enter your comment!
    Please enter your name here