Code Monkey home page Code Monkey logo

Comments (7)

3669 avatar 3669 commented on July 21, 2024 2

firstly it's need to be together
//import { AngularFireDatabase, FirebaseListObservable } from 'angularfire2/database-deprecated';

secondly it's my funcshion

getMessages(): FirebaseListObservable<ChatMessage[]> {
// query to create our message feed binding
return this.db.list('message', {
query: {
limitToLast: 20
}
});
}

and it's work now.

from base-chat.

ramzan-ali-suzan avatar ramzan-ali-suzan commented on July 21, 2024 1

For AngularFire version 5 and up use,

db.list('/items', ref => ref.orderByChild('size').equalTo('large'));

for details please refer here

from base-chat.

rijomonr avatar rijomonr commented on July 21, 2024

I'm getting the same issue Argument of type '{ query: { limitTolast: number; orderByKey: boolean; }; }' is not assignable to parameter of type 'QueryFn'.
Object literal may only specify known properties, and 'query' does not exist in type 'QueryFn'.

from base-chat.

3669 avatar 3669 commented on July 21, 2024

hii. i have this problem also. Maybe you found what need to do yet?

from base-chat.

Hillel-Nagid avatar Hillel-Nagid commented on July 21, 2024

Thanks 3669

from base-chat.

jdevsan avatar jdevsan commented on July 21, 2024

ERROR in src/app/services/chat.service.ts(55,39): error TS2345: Argument of type '{ query: { limitToLast: number; }; }' is not assignable to parameter of type 'FirebaseListFactoryOpts'.
Types of property 'query' are incompatible.
Type '{ limitToLast: number; }' is not assignable to type 'Query'.
Property 'endAt' is missing in type '{ limitToLast: number; }'.
whats happening??


chat.services.ts

getMessages(): FirebaseListObservable<ChatMessage[]> {
// query to create our message feed binding
return this.db.list('messages', {
query: {
limitToLast: 20,

    }
  });
}

from base-chat.

pranjul29 avatar pranjul29 commented on July 21, 2024

ERROR in src/app/services/chat.service.ts(48,7): error TS2345: Argument of type '{ query: { limitToLast: number; orderByKey: boolean; }; }' is not assignable to parameter of type 'QueryFn'.
Object literal may only specify known properties, and 'query' does not exist in type 'QueryFn'.
../../node_modules/rxjs-compat/Observable.d.ts(1,28): error TS2307: Cannot find module 'rxjs'.
../../node_modules/rxjs-compat/Observable.d.ts(2,70): error TS2307: Cannot find module 'rxjs'.

from base-chat.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.