You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is very easy (<10mins) to start with this nice tool. Thanks. 👍
But I have a problem since I use angular-rails-resource
and I need to parse response, so for example I can call user.save()
Is there any callback that I can use to parse response ?
I see that there is loadPage
so I tried to map response with new User userObject. It works but I have a problem that
it renders previous page (not the current) since in the time when this event callback is called, my vm.usersObject still have old values (from previous page).
// template in jade
bgf-pagination(collection="vm.usersObject" url="'http://localhost:3001/api/v1/users'")
// coffee script
$scope.$on 'pagination:loadPage', (event, status, config) ->
console.log config.headers.Range
return unless vm.usersObject # on first load it is empty
vm.users = vm.usersObject.map (userObject) -> new User userObject
console.log vm.usersObject[0].id
I tried with $scope.$apply() but it says $digest already in progress, as expected.
The text was updated successfully, but these errors were encountered:
It is very easy (<10mins) to start with this nice tool. Thanks. 👍
But I have a problem since I use angular-rails-resource
and I need to parse response, so for example I can call
user.save()
Is there any callback that I can use to parse response ?
I see that there is loadPage
so I tried to map response with
new User userObject
. It works but I have a problem thatit renders previous page (not the current) since in the time when this event callback is called, my
vm.usersObject
still have old values (from previous page).I tried with
$scope.$apply()
but it says$digest already in progress
, as expected.The text was updated successfully, but these errors were encountered: