Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • What's New In Angular 10.1? Features of Latest Angular Update

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 425
    Comment on it

    The 9th of September marked the release of the most recent Angular version 10.1 with capable features. Contrary to the previous versions of Angular, Angular 10.1 is smaller having a powerful message extraction tool, performance improvement to the compiler, updated bug fixations, and many more updates. This blog highlights the distinct Angular 10.1 features and its effect on the entire Angular system network.

    Delineating the different features of 10.1

    Typescript 4.0

    The newest version is the most dynamic version comprising a list of updates such as variadic tuple types, labelled tuple elements, editor advancements, and the deletion of other optional properties.  

    Class property reference updates

    With the introduction to the characteristic of class property inference from constructors, a list of factors has been enabled. One can use the control flow analysis for the determination of the properties’ types in classes where nolmplicitAny is permitted.

    As for instance;

    Class square {
    
     //Previously: implicit any !
    
     //Now: inferred to number !
    
     Area;
    
     Sidelength;
    
    
    
     Constructor(sidelength: number) {
    
      this.sidelength = sidelength;
    
     this.area = sidelength ** 2;
    
     }
    
    }

    The property is considered to potentially be undefined in places where paths of a

    Class square {
    
     Sidelength;
    
     Constructor(sidelength: number) {
    
     if (Math. random()) {
    
      this.sidelength = sidelength;
    
     }
    
    }
    
    get area() {
    
      return this.sidelength ** 2;
    
      // ~~~~~~~~~~~~ //
    
    error! Object is possibly undefined.
    
     }
    
    

                       

    The compiler settings in the updated version of 10.1

    The Angular 10.1 has got many updates along with a strong compiler update known as strictInputAccessModifiers. By means of enabling this strict feature, one gets reported of the error at the time of binding attempts. These attempts are followed for allotting to a controlled field on a component. However, it has to be enabled by default settings. In addition to this, the compiler provides better compilation experiences and can be used for manually adding it to the application. Angular Developer India has shown the work involved in building, transmitting, and appointing a true Web application based on Angular JS and entries.

    CLI & Solution Style typescript configurations

    The newest version, Angular 10.1, highlights a new project with CLI which emphasizes in locating a base tsconfig.json. This is enhanced with the specific ones that were in v10. With this update, you can use the ng command to update the application. However, the modifications in v10 will be mechanically regressed to the schematics.

    Usefulness of i18n

    Previously, Angular used to rely on View engine to extract messages. Conversely, this isn’t the same anymore. Angular 10.1 is renewed in a way to use the new extractor from @angular/localize to execute it. As you run ng x i18n in your applications, the Ivy application starts working along with it. It enables the CLI to extract messages to the $localize function under the Typescript files. This, in turn, permits various translations files per locale for merging the messages.

    The mentioned command shows the above feature:

     

    “i18n”: {

       “locales”: {

         “fr” :  [“src/locale/messages.fr.xlf”, “src/locale/messages-2.fr.xlf”]

       }

    }

     

    Popular Angular 10.1 updates

    ·         In the new version, the previous deprecation of the testing function async renamed to waitForAsync. It helps to implement while replacing it everywhere sans any behavioural change.

    ·         There are certain options for absolute URL HTTP support.

    ·         The exposition of canparse() diagnostics.

    ·         Command EntryPointManifest is made reusable for loading entry point dependencies in order to avert invocation all the time during parsing.

    ·         The ng module is summed up with LinkablePackageInfo in bazel tool to enable proper linking of the ng module target.               

     

    Final dictum

    Subsequent to analyzing the different Angular 10.1 updates, it can be concluded that all these improvements has made it convenient for users to work with it. With every rendition, different upgrades and advancements make it more interesting and remarkable.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: