|
Jacob Wenger |
at Jul 23, 2014 at 10:25 pm
|
⇧ |
| |
Hey James,
It looks like you are trying to use arrays. Lucky for you, we are greatly
improving the AngularFire array support (among many other things) with our
upcoming 0.8 release. The new $FirebaseArray will save you a lot of time.
While it will be another week or so until we officially launch 0.8, the API
is practically frozen and I'd suggest moving to it, especially if this is a
new project. It will save you a lot of time. You can grab the code in our release_0.8
branch on GitHub <
https://github.com/firebase/angularFire/tree/release_0.8>.
Here are the current API docs
<
http://firebase.github.io/angularFire/flatdoc.html> to get you started.
Check out our examples for $FirebaseArray.
If you do want to do this in 0.7.x, you should check out our orderByPriority
example in our API documentation
<
https://www.firebase.com/docs/angular/reference.html#orderbypriority>:
<ul ng-repeat="item in items | orderByPriority">
<li>
<input type="text" id="{{ item.$id }}" ng-model="item.$priority" />
{{ item.name }}
</li>
</ul>
The item value within each loop iteration should contain what you want.
Jacob
On Tuesday, July 22, 2014 11:48:27 PM UTC-7, James Bennett Saxon wrote:
Hey folks,
I'm missing something.
I've got a something from firebase which I can iterate on in the template,
but I'd like to monkey with the data in the controller. But maybe that's
not ok?
The problem is the keys:
- * -3*
- * -JSVkOs7vCXh1iBAzxsi: *74
-
- * -2*
- * -JSVnT2OqIdZ3IvJ2zjd: *4
It ends up looking like {*-JSVkOs7vCXh1iBAzxsi: *74} in the code. How do
I peel off the value and ignore the unique key either in the controller or
in the template?
Thanks!
Jaems
--
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/34c42c95-efdf-4bf2-8bea-d43a65f813bc%40googlegroups.com.For more options, visit
https://groups.google.com/d/optout.