Know the Features of Angular 4

   Mar 30, 2017              Web Development

By skipping the Angular 3, Google astounded everybody with the declaration of Angular 4, a most recent development to mobile and desktop development JavaScript system. This declaration confirm, Google is more centered around enhancing the components of Angular instead of simply expanding variant numbers.

Angular 4

Amid the NG-BE 2016 Angular Conference held at Belgium, Igor Minar the Angular Team Lead at Google, as of now presented Angular 4 form and exhibited the calendar of future Angular version announcement. At the meeting he expressed, Google will move to Angular version 4 from the version 2, to relate the variant 4 switch with the overhaul.

Going to what's new in Angular 4, the most striking element, it is faster when compared with the past variants. It is implied for the applications vigorously subject to activitys where the center liveliness capacities are exchanged to a discrete packeage which can now be utilized independently. Considering this change, developers could without much of a stretch search for the documentation and use the auto completion.

Furthermore, the Ahead of Time (AoT) assemblage is the significant component presented in Angular 4 version. While in AoT mode, layouts are ordered at runtime amid the construct and the JavaScript code is created. AoT mode empowers quicker application to execution by producing to a great degree less measure of code, which therefore enhances application execution regardless of its size.

The whole structure is changed with TypeScript, a typed superset of JavaScript in which the Angular 4 variant uses TypeScript 2.1. The new form of TypeScript offers stunning components to consent to the present day web eco system.

Likewise, a source guide will be created for the blunder cases inside a layout to encourage significant setting considering the first format. In view of the descending similarity, the Angular group crippled the TypeScripts strictNullchecks setting with the current release, as they have to work more on this specific component.

Yes, by presenting the Angular 4 variant, Google has made a stride towards future. So have you as of now begun arranging your Angular 4 migration?

Features of Angular 4:-

  • Improve robustness in router
  • New View Engine for optimizing generated code.
  • If you are not using animation, code is not added in your application. When you want to use animation, you can add by npm.
  • New version of typescript is there i.e. TypeScript 2.1. it will improve speed and type checking in your application.
  • More router security is there specially for lazy loaded module.
  • Use abstract keyword where possible to decrease file size.
  • Add pure expression and event support to view engine.
  • Allow Calc and gradient functions.
  • DatePipe shouldn’t throw for NaN and it parses input string even if it’s not a valid date in browser
  • Now packaging allows applications, project or website to turn on strictNullChecks mode in your Typescript. If you desire than use strictNullChecks.
  • AsyncPipe.transform() is commonly added in angular 4
  • You can add support and services for source map generation
  • You may add target locale to the translation bundles
  • You can style encapsulation for new view engine
  • New Observable property is added isStable in ApplicationRef to show when it’s stable and unstabe
  • New API added to render Module and ModuleFactory to string.
  • Now platform-server supports @angular/http from @angular/platform-server
  • Disable non-components as an entry component
  • Improve error messages for unknown elements and properties in aot compiler
  • Change ChangeDetectorRef Parameter from KeyValueDifferFactory and IterableDifferFactory
  • Compress Closure Compiler warning.
  • getRawValue should correctly work with nested FormGroups/Arrays in Angular 4 Form.
  • Allow to mix shadow dom with non shadow dom in platform-browser and should not throw debug for containing $. You can also add styles with native encapsulation in shadow DOM.
  • Allow to create multiple platformServer and platformDynamicServer.


Deprecations of Angular 4:-


  • KeyValueDifferFactory and IterableDifferFactory no longer have ChangeDetectorRef as a parameter. It was not used and has been there for historical reasons.
  • OpaqueToken is now deprecated, use InjectionToken<T> instead.
  • Injector.get(token: any, notFoundValue?: any): any is now deprecated use the same method which is now overloaded as Injector.get<T>(token: Type<T>|InjectionToken<T>, notFoundValue?: T): T;


Major Changes in Angular 4:-


  • Classes that derive from AsyncPipe and override transform() might not compile correctly.
  • RootRenderer cannot be used in angular 4 because it is a deprecated in angular 4. You can use RendererFactoryV2.
  • Support for Iterable<T> is not required at runtime but a type definition Iterable<T> must be available.
  • injector.get() is now parameterize it is possible that code which used to work no longer type checks.


Contact us for Website Design & Development