googlearchive / firebase-util

An experimental toolset for Firebase
http://firebase.github.io/firebase-util
MIT License
276 stars 58 forks source link

Angular and AngularFire #11

Closed jbonigomes closed 10 years ago

jbonigomes commented 10 years ago

What is the right way to integrate this lib with Angular.js and AngularFire?

katowulf commented 10 years ago

You can create a ref with this lib and pass it into AngularFire the same way you would pass a Firebase ref. This lib will be getting a refresh in the near future to address some of the bugs with limit that users have encountered, but it's otherwise perfectly compatible.

jbonigomes commented 10 years ago

Got it, thanks Kato, also, is there a way to inject the lib in my Angular app, at the moment I am importing it globally, not sure if this is the right way.

katowulf commented 10 years ago

$window.Firebase.util should work fine with jslint, test units, et al.

jbonigomes commented 10 years ago

Thanks Kato, great work with Firebase, love your blogs. Closing this issue.

katowulf commented 10 years ago

Also, it looks like we already inject Firebase, so you could utilize it like this as well:

app.factory('foo', function(Firebase) {
    Firebase.util;
});
jbonigomes commented 10 years ago

ah, even better, thanks for that