Property ‘toPromise’ does not exist on type ‘Observable’

You need to add the operator like this:

import 'rxjs/add/operator/toPromise';

This is needed for every rxjs operator you want to use.

Leave a Comment