The focus of angular has always been to stay faster, smaller and easier. Angular 6 continues to stay true to that theme and has a number of new features that will help developers get their jobs done better than ever before. Let’s check out some of these new features:
What’s new in Angular 6?
To help achieve the goal of being smaller, faster and easier, the version 6 beta features a new renderer called Ivy. The beta also adds an optional, backward-compatible generic type to support typed nativeElement. Loaded with all those powerful features, Angular 6 will officially release in March or April 2018, paving way for Angular 7 in September/October 2018.
Angular 6 adds a number of new features and removes a few old ones too. Here’s a list of everything you can expect to see in the new version, so brace yourself and here we go.
- Added Angular Material and CDK Stable Release
- Support Service Worker in the CLI
- ng generate universal
- ng build –app= < name >
- Improved Universal and AppShell Support in the CLI
- ng generate app-shell [ –universal-app ] [ –route ]
- Improved decorator error messages
- TypeScript 2.5.x support
- npm install [email protected]’~2.5.3′
- Added to support – nativeElement
- Re-introduced Query Predicate with more focused role
- Missing lifecycle tests for projected components added
- Safety worker described
- afterContentInit and afterContentChecked added to render
- Some fixes on language service –
- The 2.6 version of Typescript’s “resolveModuleName” started to require paths passed to be separated by ‘/’ instead of being able to handle ‘\’.
- Move init hooks into TView
- Correct onDestroy order for projected components
- Added type and hooks to directive def
- Enabled size tracking of a minimal CLI render3 application
- Fix platform-detection example for Universal
- Added canonical view query
- Some enhancements on compiler to reflect changes
- Renamed QueryPredicate to LQuery
- Renamed LQuery to LQueries and associated renames
- Allowed HttpInterceptors to inject HttpClient –
- Previously, an interceptor attempting to inject HttpClient directly would receive a circular dependency error, as HttpClient was constructed via a factory which injected the interceptor instances. Users want to inject HttpClient into interceptors to make supporting
- Either HttpClient or the user has to deal specially with the circular Dependency. This change moves that responsibility into HttpClient itself. By utilizing a new class HttpInterceptingHandler which lazily Loads the set of interceptors at request time, it’s possible to inject HttpClient directly into interceptors as construction of HttpClient no longer requires the interceptor chain to be constructed.
- Added navigationSource and restoredState to NavigationStart –
- Currently, NavigationStart there is no way to know if navigation was triggered imperatively or via the location change. These two use cases should be handled differently for a variety of use cases (e.g., scroll position restoration). This PR adds a navigation source field and restored navigation id (passed to navigations triggered by a URL change).
- Removed generation of comments
- Fixed SideNav height on narrow screens –
- Since we specify `bottom: 0`, specifying the height is unnecessary and Leads to wrong height (unless updated) on narrow screens where the topbar height is decreased.
The beta version of Angular 6 has developers excited and for good reason. The build optimizer successfully makes the application smaller, the improved compiler makes things a whole lot faster and the overall experience is extremely easy and intuitive. Angular 6 successfully mitigates the few shortcomings of Angular 5 such as the problem with production build source maps. So check out the all new and loaded Angular 6 right now.
Where can you download the Angular 6 beta?
You can download the Angular 6 beta from GitHub.