Giter Club home page Giter Club logo

Comments (5)

anantn avatar anantn commented on August 21, 2024

Just checking if the following was a typo, or intended to be this way:

cls = Backbone.Firebase.Collection.extend(
    model: ChatMessage
    firebase: firebase
      .child('worlds')
      .child(worldId)
      .child('chat'))
      .limit(50)

You have an extra bracket after 'chat', instead of the limit. Does the following work?

cls = Backbone.Firebase.Collection.extend(
    model: ChatMessage
    firebase: firebase
      .child('worlds')
      .child(worldId)
      .child('chat')
      .limit(50))

from backbonefire.

irskep avatar irskep commented on August 21, 2024

The bracket is unrelated. The error occurs at chatList.add().

I was copy/pasting some internal code and renaming things to make the example simpler. (Edited to fix 2 paren issues.)

from backbonefire.

raventos avatar raventos commented on August 21, 2024

did you find a way to do this? if I use your workaround when I update a model inside the controller, I get the error:

Uncaught TypeError: Object # has no method 'child' backbone-firebase.js:180
_updateModel backbone-firebase.js:180
c backbone-min.js:1
a.Events.trigger backbone-min.js:1
h.extend.set backbone-min.js:1
Backbone.Firebase.Collection.Backbone.Collection.extend._childChanged (...)

Something fails when adding an element.

from backbonefire.

raventos avatar raventos commented on August 21, 2024

Just a quick heads-up: the issue has been fixed in the last release.

from backbonefire.

anantn avatar anantn commented on August 21, 2024

Yes, this was fixed by e7a9c5b

from backbonefire.

Related Issues (20)

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.