1. Angular 5 new features
1.1. Form Validation
Validation on blur and submit:
<form [ngFormOptions]="{updateOn: 'submit'}">
<input name="firstName" ngModel [ngModelOptions]="{updateOn: 'blur'}">
1.2. New Router Lifecycle events
- allow to track the routing cycle
- used to do things like show spinners, measure performance of guards
GuardsCheckStart
ChildActivationStart
ActivationStart
GuardsCheckEnd
ResolveStart
ResolveEnd
ActivationEnd
ChildActivationEnd
1.3. RxJS 5.5 imports
import { Observable } from 'rxjs/Observable';
import { map, filter } from 'rxjs/operators';
const names = allUserData.pipe(
map(user => user.name)
filter(name => name),
);
1.4. Universal Transfer API
- Easily share app state between server and client version
- ServerTransferStateModule has been added
- Optimizes fetching data over HTTP
- More DOM manipulations/support
1.5. Other changes and Optimization
- bug fixes
- preserveWhitespace Option
- exportAs
- Zone speed improvements
platformBrowserDynamic()
.bootstrapModule(AppModule, { ngZone: 'noop' })
.then((ref) => {});