Some of the usage examples seem to be broken, for example the query function...
$scope.posts = Post.query({
page: 1
});
...doesn't return a collection like the example suggests. Tested on Angular 1.0.7 & 1.1.5 with the following code:
app.factory('User', function (firebaseResource) {
var User = firebaseResource({
path: 'users',
hasMany: ['Post']
});
return User;
});
app.factory('Post', function (firebaseResource) {
var Post = firebaseResource({
path: 'posts',
belongsTo: true,
perPage: 10
});
return Post;
});
app.controller('PostsCtrl', function ($scope, Post, User) {
$scope.user = User.query()[0];
$scope.posts = $scope.user.posts().query({
page: 1
});
});
Sorry I couldn't get a Fiddle up to demonstrate the problem...
Some of the usage examples seem to be broken, for example the query function...
...doesn't return a collection like the example suggests. Tested on Angular 1.0.7 & 1.1.5 with the following code:
Sorry I couldn't get a Fiddle up to demonstrate the problem...