Angular 6 New Features and Improvements
According to the plan, Angular 6 will be officially released at the end of March, with the current latest version being
6.0.0-beta.3
.
Of course, Angular 6 compared to 5 will make development easier, with smaller bundle sizes and faster performance.
Angular 6 Improvements and Features
- CLI Integration with Service Worker Support
ng generate universal <name>
ng build --app=<name>
- CLI Improved Support for Universal and App Shell
ng generate app-shell [ --universal-app <universal-app-name>] [ --route <route>]
- Improved Decorator Error Messages
- TypeScript 2.5.x Support
npm install typescript@'~2.5.3'
- Many Valuable Features
- Added nativeElement Support
- Reintroduced Query Predicate
- Added Missing Lifecycle Tests for Projected Components
- Described Safety Worker
- Added afterContentInit and afterContentChecked
- Various Fixes for Language Service
- TypeScript 2.6’s
resolveModuleName
requires passed paths to be separated by ‘/’
- TypeScript 2.6’s
- Moved Init Hooks to TView
- Corrected onDestroy Order in Projected Components
- Added Types and Hooks for Directive Definitions
- Support for Bundle Size Tracking in CLI render3 Applications
- Fixed plat-detection Example Under Universal
- Added Canonical View Queries
- Compiler Improvements Regarding Reflect Changes
- Renamed QueryPredicate to LQuery
- Renamed LQuery to LQueries and Related
- Allow HttpInterceptors to Inject HttpClient
- Previously, injecting HttpClient in interceptors would cause circular dependency errors.
- Now you can directly declare HttpClient objects in the interceptor’s constructor
- Added navigationSource and restoredState to NavigationStart
- Currently, NavigationStart cannot tell whether navigation was forcibly triggered or location changed
- Removed Comment Generation
- Fixed SideNav Height Issues on Narrow Screens
Original English article: Click here
For more detailed information about features and bugs, please check the official repository: Click here
Final Thoughts
Angular 6 brings significant improvements in developer experience, performance, and bundle size optimization. The enhanced CLI support for Service Workers and Universal rendering makes it easier to build modern web applications with better performance and SEO capabilities. These improvements continue Angular’s evolution toward a more efficient and developer-friendly framework.