manekinekko / angular-web-bluetooth

The missing Web Bluetooth module for Angular
https://manekinekko.github.io/angular-web-bluetooth/
MIT License
195 stars 56 forks source link

error: property 'map' and 'mergeMap' does not exist... #44

Closed n1705771 closed 6 years ago

n1705771 commented 6 years ago

I integrated bluetooth component and battery level service into my angular project. When I run ng serve --open, I get below errors. Could you please give some comments for the root causes?

ERROR in src/app/bluetooth.service.ts(24,37): error TS2339: Property 'map' does not exist on type 'Observable'. src/app/bluetooth.service.ts(43,10): error TS2339: Property 'mergeMap' does not exist on type 'Observable<void | BluetoothRemoteGATTServer>'.

n1705771 commented 6 years ago

solved by change import part in service.ts file to:

import { Observable } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators';