angularfire2

angularfire2 doesn't work after released to beta.6

懵懂的女人 提交于 2019-12-20 04:19:08
问题 After angularfire2 released to beta.6, I can't excute my Ionic2 app properly. Here is the issue. [21:54:35] lint finished in 4.51 s [21:54:35] typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase.d.ts, lin e: 12 Duplicate identifier 'Promise'. L11: static reject(error: Error): firebase.Promise<any>; L12: static resolve<T>(value?: T): firebase.Promise<T>; [21:54:35] typescript: ...uy Network/BoonBuy/node_modules/angularfire2/node_modules/firebase/firebase

Recursive calls to Firestore

拈花ヽ惹草 提交于 2019-12-20 03:02:28
问题 I have a Firebase Firestore with "Components" as a root collection. Each document (a "Component") in the collection may have an array called "children", with each item in the array being an "id" of another component, essentially, a one-to-many relationship. Since every child is also a component it may also have its own children and so forth. Components Collection Parent 1_Parent (document) │ name: 'Parent' │ id: '1_Parent' └─children (array) ├─1.1_Child_one └─1.2_Child_two First Child 1.1

Creating an auto complete search using angularfire2 and firestore?

好久不见. 提交于 2019-12-19 21:18:44
问题 I'm trying to build a simple search function for my web app. there is documentation on how to create it with real time database. What changes do I need to make to make this work on firestore ? this tutorial was taken from here https://angularfirebase.com/lessons/autocomplete-search-with-angular4-and-firebase/ it has a nice video as well :) this is how to make it with real time database : #movies.service.ts import { Injectable } from '@angular/core'; import { AngularFireDatabase,

What's the best way to check if a Firestore record exists if its path is known?

邮差的信 提交于 2019-12-18 13:01:42
问题 Given a given Firestore path what's the easiest and most elegant way to check if that record exists or not short of creating a document observable and subscribing to it? 回答1: Taking a look at this question it looks like .exists can still be used just like with the standard Firebase database. Additionally, you can find some more people talking about this issue on github here The documentation states NEW EXAMPLE var docRef = db.collection("cities").doc("SF"); docRef.get().then(function(doc) {

angularfire2 best way to increment a value?

可紊 提交于 2019-12-18 04:17:13
问题 I searched in many forums, questions, in doc but can't find the correct solution. Problem What is the best way to increment a value using angularfire2 ? I saw we could use [transaction()][] but it's not for angularfire2 actually. Or with snapshot ? user.service.ts incrementLike(userToIncrementLike){ this.af.database.object('users/' + userToIncrementLike.uid).subscribe((userObject) => { var newUser = { likes: userObject.likes + 1 }; }); this.af.database.object('users/' + userToIncrementLike

/angularfire2/index has no exported member 'AngularFire'

前提是你 提交于 2019-12-17 18:53:05
问题 Can't fix this problem: app.component.ts import { AngularFire, AuthProviders, AuthMethods } from 'angularfire2'; /angularfire2/index has no exported member 'AngularFire', /angularfire2/index has no exported member 'AuthProviders', /angularfire2/index has no exported member 'AuthMethods ' but in app.module.ts import { AngularFireModule } from 'angularfire2'; works fine and I can initialize the app package.json "angularfire2": "^4.0.0-rc.0", "core-js": "^2.4.1", "firebase": "^3.9.0", ...

Getting an error: “Has no exported member AngularFire, AuthProviders, AUthMethods, FirebaseListObservable” in AngularFire2?

﹥>﹥吖頭↗ 提交于 2019-12-17 15:51:59
问题 I am new to Angular 4, so I am creating a firebase chat app with Angular 4, and then when I import some modules like this: import { AngularFire, AuthProviders, AuthMethods,FirebaseListObservable } from 'angularfire2'; I get an error for each module that says Has no exported member AngularFire, AuthProviders, AUthMethods, FirebaseListObservable. Thank you 回答1: UP TO DATE(Ver 5.0.0-rc3): While getting this error, this means you are using old Database API. This can solved by importing

NullInjectorError: No provider for AngularFirestore

让人想犯罪 __ 提交于 2019-12-17 15:37:58
问题 I'm learning Angular looking for help in fixing the error: I'm following this link : https://github.com/angular/angularfire2/blob/master/docs/install-and-setup.md to create a angular small app with angular2 and angularfirestore2 but when I hit ng serve I am getting the below error in browser console.. StaticInjectorError[AngularFirestore]: StaticInjectorError[AngularFirestore]: NullInjectorError: No provider for AngularFirestore! at _NullInjector.get (core.js:923) at resolveToken (core.js

TypeError: Object(…) is not a function

只愿长相守 提交于 2019-12-17 10:51:38
问题 working on ionic3, angularfire2 v5 TypeError: Object(...) is not a function at SwitchMapSubscriber.project (http://localhost:8100/build/vendor.js:73935:76) at SwitchMapSubscriber._next (http://localhost:8100/build/vendor.js:61778:27) at SwitchMapSubscriber.Subscriber.next (http://localhost:8100/build/vendor.js:20750:18) at RefCountSubscriber.Subscriber._next (http://localhost:8100/build/vendor.js:20786:26) at RefCountSubscriber.Subscriber.next (http://localhost:8100/build/vendor.js:20750:18)

No provider for AngularFireDatabase, AngularFireAuth

和自甴很熟 提交于 2019-12-17 06:39:11
问题 Apologies as I can't think of a better way of including all the information... When I run this, I get an error saying the following. I've followed the Ionic Docs to the T, I can't figure out what could possibly be wrong. Error: No provider for AngularFireDatabase! Package.json App.module.ts Home.html Home.ts 回答1: AngularDatabase ( same for AngularAuth ) is separated to its own module AngularFireDatabaseModule ( AngularFireAuthModule for AngularAuth ) from version angularFire2@4.0.0 , see