Hi guys!

Here's a trivial question from a newbie:

I have a model in angular which is bound to firebase
($scope.items=$firebase(blah)) and I use ng-repeat to iterate through the
items. Every item in firebase has a corresponding geofire location by the
key of the item.
How can I update my controller to only include items by a custom radius
around the user? I don't want to filter by distance in angular, just ask
firebase to only retrieve closer items (say 0.3km around a location). I
looked around geoqueries but they have a different purpose and I don't know
how to bind them to the model anyway. The user may change the radius and
the items list should be updated accordingly, so they need to be bound
somehow.

Any suggestion is welcome but an example would be greatly appreciated as I
don't have fluency in this trio of angular/firebase/geofire. Yet :P


Thanks in advance,

Bosch

--
You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
To post to this group, send email to firebase-angular@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/2b7cce01-8e89-4e62-8367-8476f7e7041a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Jacob Wenger at Aug 5, 2014 at 7:32 pm
    This question was cross-posted in the Firebase Google Group. You can find
    my answer here
    <https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/firebase-talk/VUdy5yAhN1k>
    .
    On Tuesday, August 5, 2014 1:52:11 AM UTC-7, Bosch wrote:

    Hi guys!

    Here's a trivial question from a newbie:

    I have a model in angular which is bound to firebase
    ($scope.items=$firebase(blah)) and I use ng-repeat to iterate through the
    items. Every item in firebase has a corresponding geofire location by the
    key of the item.
    How can I update my controller to only include items by a custom radius
    around the user? I don't want to filter by distance in angular, just ask
    firebase to only retrieve closer items (say 0.3km around a location). I
    looked around geoqueries but they have a different purpose and I don't know
    how to bind them to the model anyway. The user may change the radius and
    the items list should be updated accordingly, so they need to be bound
    somehow.

    Any suggestion is welcome but an example would be greatly appreciated as I
    don't have fluency in this trio of angular/firebase/geofire. Yet :P


    Thanks in advance,

    Bosch
    --
    You received this message because you are subscribed to the Google Groups "Firebase + AngularJS" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to firebase-angular+unsubscribe@googlegroups.com.
    To post to this group, send email to firebase-angular@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-angular/4dfba908-3462-49bb-b34e-e6c2dd253213%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupfirebase-angular @
postedAug 5, '14 at 7:19p
activeAug 5, '14 at 7:32p
posts2
users2

2 users in discussion

Jacob Wenger: 1 post Bosch: 1 post

People

Translate

site design / logo © 2021 Grokbase