Closed chaoyangnz closed 9 years ago
Try to add
$scope.$apply();
at the end of the callback.
@kurbatov yes, I actually did that. But is it a bug of ng-stomp or not?
I guess it is not a bug. This behavior gives more fine-grained control over updating the view.
@richdyang IMHO a library should not explicitly apply the scope as this might lead to undesired side effects.
var subscription = $stomp.subscribe('/queue/' + user.id + '/interviews/1', function (payload, headers, response) { console.log(headers) console.log(response) console.log(payload)
}, {});
I update the variables in the callback, but the view has no update to reflect the change.