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

  1. allow to track the routing cycle
  2. 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) => {});
Copyright © Guanghui Wang all right reserved,powered by GitbookFile Modified: 2019-08-25 13:56:34

results matching ""

    No results matching ""