I can pass a dinamic collection?
marcoriesco opened this issue · comments
Marco Riesco commented
As I spend a dynamic collection to the factory?
I'm trying some ways and still can not, I tried to pass the parameter :collection, but does not.
Any idea?
.factory('ALL', function($mongolabResourceHttp) {
//Here get the collection, pass from controller...
return $mongolabResourceHttp(COLLECTION);
})
CONTROLLER:
ALL.all(COLLECTION, { limit: 10 }).then(function(response) {
$scope.dashboardposts = response.data;
});