@lprnvr wrote:
Here is my error:
Module '"../../../../../../my-stuff/node_modules/angularfire2/database"' has no exported member 'FirebaseListObservable'.ts(2305)
import { Component } from '@angular/core'; import { AlertController } from '@ionic/angular'; import { Camera, CameraOptions } from '@ionic-native/camera'; import { GoogleCloudVisionServiceService } from '../google-cloud-vision-service.service'; import { AngularFireDatabase, FirebaseListObservable } from 'angularfire2/database'; @Component({ selector: 'app-home', templateUrl: 'home.page.html', styleUrls: ['home.page.scss'], }) export class HomePage { items: FirebaseListObservable<any[]>; constructor( private camera: Camera, private vision: GoogleCloudVisionServiceService, db: AngularFireDatabase, private alert: AlertController) { this.items = db.list('items'); } takePhoto() { const options: CameraOptions = { quality: 100, targetHeight: 500, targetWidth: 500, destinationType: this.camera.DestinationType.DATA_URL, encodingType: this.camera.EncodingType.PNG, mediaType: this.camera.MediaType.PICTURE } this.camera.getPicture(options).then((imageData) => { this.vision.getLabels(imageData).subscribe((result) => { this.saveResults(imageData, result.json().responses); }); }); } saveResults(imageData, results) { this.items.push({ imageData: imageData, results: results}); } }
Posts: 1
Participants: 1