I'm doing this course now and I'm totally stuck because it seems that all these firebase modules have changed. If someone knows how all of this has changed and what to do, please tell me! thanks
@@Don_ron666 thx ruben for your comment. Im really dissapointed with the course, it is really out of date and not support at all from the teacher and no way to refund it...
English is not my mother tongue but man you made a fantastic explanation. I was searching during days with tons of videos regarding to this topic but any of them were so good like this. After this, All I can do is give you a like and subscribe to your channel. You truly deserve it.
I need help. I'm having troubles around 16:51. Somehow "db.list" doesn't have the subscribe property anymore. Here is the error: "Property 'subscribe' does not exist on type 'AngularFireList'." It also says that the return type of "db.list" is "AngularFireList". So I'm guessing that it is no longer returning an observable which why the subscribe property is no longer available. Angular CLI: 7.1.4 Node: 10.15.0 @angular/fire: 5.1.1 Please help. Thanks. EDIT: So I found the answer. db.list('/courses') .valueChanges() .subscribe(courses=> { this.courses= courses; console.log(this.courses); });
I would note that even with observables coming from http (even they emit single value) we should care about unsubscribe on component destroy hook because the ajax call could take some time, and if the component is destroyed before the call completes, the subscription will still be in play (you can try it with rxjs .delay in angular 4)
I know what you mean - and that's one reason I like online courses with someone other than a normal American accent. The interesting way the words are spoken helps keep me tuned in for some reason, and keeps me from getting distracted during parts I already know. All the online courses I take are with instructors with accents! I specifically enjoy how Mosh speaks.
i have a slight difference (nov 13 2017). When i go to the console, I don't have objects, rather the data received from Firebase is a normal array. Later, in the view snippet, to get it to work i used {{ course }} rather than {{ course.$value }} . Does anyone else have this difference?
I like a lot your way of teaching !! I'm having some difficulties in displaying data from fire-base. I'm using NG 6, and since a lot have been changed and deprecated i struggled a bit to get the same result as a beginner with NG 6. I couldn't manage to display data like your '' Adding object lecture " exactly when i pushed an object and tried to display it using {{ course || course.name }}. I get as a return the list but with [object object] instead of course5. If anyone had the same problem, it would be great to share your solutions. Thanks in advance !
StackOverflow says that it should work: db.list('/courses') .valueChanges() .subscribe(courses=> { this.courses= courses; console.log(this.courses); });
im doing his angular course and im really stuck in the project, it seems to be that all the firebase configuration has changed and the course has not been updated. not recommended his angular course!!!
I have type error in Adding Object section in html file (let course of courses$ | async): Error: InvalidPipeArgument: '[object Object]' for pipe 'AsyncPipe' How can I fix it? It seems I have different types and *ngFor doesn't iterate courses$ But adding new course to the database works correctly. The issue is that it isn't displaying on the page.
i get this error ERROR in node_modules/@angular/fire/firebase.app.module.d.ts:2:10 - error TS2614: Module '"../../firebase"' has no exported member 'analytics'. Did you mean to use 'import analytics from "../../firebase"' instead? 2 import { analytics, app, auth, database, firestore, functions, messaging, performance, remoteConfig, storage } from 'firebase/app'; ~~~~~~~~~ node_modules/@angular/fire/firebase.app.module.d.ts:2:21 - error TS2614: Module '"../../firebase"' has no exported member 'app'. Did you mean to use 'import app from "../../firebase"' instead? 2 import { analytics, app, auth, database, firestore, functions, messaging, performance, remoteConfig, storage } from 'firebase/app'; ~~~ node_modules/@angular/fire/firebase.app.module.d.ts:2:26 - error TS2614: Module '"../../firebase"' has no exported member 'auth'. Did you mean to use 'import auth from "../../firebase"' instead? 2 import { analytics, app, auth, database, firestore, functions, messaging, performance, remoteConfig, storage } from 'firebase/app'; ~~~~ node_modules/@angular/fire/firebase.app.module.d.ts:2:32 - error TS2614: Module '"../../firebase"' has no exported member 'database'. Did you mean to use 'import database from "../../firebase"' instead? 2 import { analytics, app, auth, database, firestore, functions, messaging, performance, remoteConfig, storage } from 'firebase/app'; ~~~~~~~~ node_modules/@angular/fire/firebase.app.module.d.ts:2:42 - error TS2614: Module '"../../firebase"' has no exported member 'firestore'. Did you mean to use 'import firestore from "../../firebase"' instead? 2 import { analytics, app, auth, database, firestore, functions, messaging, performance, remoteConfig, storage } from 'firebase/app'; ~~~~~~~~~ node_modules/@angular/fire/firebase.app.module.d.ts:2:53 - error TS2614: Module '"../../firebase"' has no exported member 'functions'. Did you mean to use 'import functions from "../../firebase"' instead? 2 import { analytics, app, auth, database, firestore, functions, messaging, performance, remoteConfig, storage } from 'firebase/app'; ~~~~~~~~~ node_modules/@angular/fire/firebase.app.module.d.ts:2:64 - error TS2614: Module '"../../firebase"' has no exported member 'messaging'. Did you mean to use 'import messaging from "../../firebase"' instead? 2 import { analytics, app, auth, database, firestore, functions, messaging, performance, remoteConfig, storage } from 'firebase/app'; ~~~~~~~~~ node_modules/@angular/fire/firebase.app.module.d.ts:2:75 - error TS2614: Module '"../../firebase"' has no exported member 'performance'. Did you mean to use 'import performance from "../../firebase"' instead? 2 import { analytics, app, auth, database, firestore, functions, messaging, performance, remoteConfig, storage } from 'firebase/app'; ~~~~~~~~~~~ node_modules/@angular/fire/firebase.app.module.d.ts:2:88 - error TS2614: Module '"../../firebase"' has no exported member 'remoteConfig'. Did you mean to use 'import remoteConfig from "../../firebase"' instead? 2 import { analytics, app, auth, database, firestore, functions, messaging, performance, remoteConfig, storage } from 'firebase/app'; ~~~~~~~~~~~~ node_modules/@angular/fire/firebase.app.module.d.ts:2:102 - error TS2614: Module '"../../firebase"' has no exported member 'storage'. Did you mean to use 'import storage from "../../firebase"' instead? 2 import { analytics, app, auth, database, firestore, functions, messaging, performance, remoteConfig, storage } from 'firebase/app'; ~~~~~~~ node_modules/@angular/fire/firestore/interfaces.d.ts:2:10 - error TS2614: Module '"../../../firebase"' has no exported member 'firestore'. Did you mean to use 'import firestore from "../../../firebase"' instead? 2 import { firestore } from 'firebase/app'; ~~~~~~~~~ node_modules/@angular/fire/firestore/collection/collection.d.ts:2:10 - error TS2614: Module '"../../../../firebase"' has no exported member 'firestore'. Did you mean to use 'import firestore from "../../../../firebase"' instead? 2 import { firestore } from 'firebase/app'; ~~~~~~~~~ node_modules/@angular/fire/firestore/document/document.d.ts:5:10 - error TS2614: Module '"../../../../firebase"' has no exported member 'firestore'. Did you mean to use 'import firestore from "../../../../firebase"' instead? 5 import { firestore } from 'firebase/app'; ~~~~~~~~~ node_modules/@angular/fire/firestore/collection-group/collection-group.d.ts:2:10 - error TS2614: Module '"../../../../firebase"' has no exported member 'firestore'. Did you mean to use 'import firestore from "../../../../firebase"' instead? 2 import { firestore } from 'firebase/app'; ~~~~~~~~~ node_modules/@angular/fire/firestore/firestore.d.ts:8:10 - error TS2614: Module '"../../../firebase"' has no exported member 'firestore'. Did you mean to use 'import firestore from "../../../firebase"' instead? 8 import { firestore } from 'firebase/app';
Hey Mosh we got an latest update on Firebase ie FireStore. what do you say about that i mean any course update and demo video's on this would be great.
hi Mosh.. seriously you did a very good job ... can you plz do me a favour .. i need to link for build enterprise apps with angular course .. can you plz paste it here.. i cannot find it on your website.
Though I have a problem with fetching data from firebase in form of objects. courses: any[]; constructor(db: AngularFireDatabase) { db.list('/courses').valueChanges().subscribe(courses => {this.courses = courses; console.log(this.courses); }); } This is the way, how I fetch data from firebase, because I am working with the latest version of Angular. So it returns data not in form of objects-key: value pairs, but I get an array like: (3) ["course 1", "course 2", "course 3"]. Do you have any suggestions how can I fix that? Thank you in advance.
sir i am having problem for adding firebase as am using angular 6 with new version of firebase... these methods are somehow not working... i am very greatful to you if you will make a video on it ..its very much needed
Thanks for this very nice tutorial! I have a small problem, when I want to call the "subscribe" on db.list('courses'), I get the following message: Property 'subscribe' does not exist on type 'AngularFireList'. Is that changed over time, or ..?
I had the same problem have a look to the code below db.list('/courses').valueChanges().subscribe(result=>{ this.courses=result; console.log(this.courses); })
mosh i am getting some error while running the command npm install firebase angularfire2 --save if somehow i manage to pass i am getting some more errors in console regarding function and some fire* is not exported from '@angular/modul....blablabla' please do help me
In console.log it does not print the object it just print the values db.list('/courses').valueChanges().subscribe(courses =>{ this.course = courses; console.log(this.course); }); Output in console 0: "course1" 1: "course2" 2: author: "name" price: 150
14:19 there is some way for check if connection are right without insert ou read data? Tutorial end sad 17:40 ERROR: (Property 'subscribe' does not exist on type 'AngularFireList')
Getting this error while "ng serve", can anybody help me out /node_modules/angularfire2/database/list/audit-trail.d.ts (7,133): Cannot find namespace 'database'
that is because of a breaking change in firebase package in 4.8.1, try changing the version of firebase: ^4.8.1 to firebase: 4.8.0 in package.json, and then hit npm update in the project folder.