Attempting to initiate an asynchronous API call through the onEnter function to a new .state.
onEnter: function(StatFactory){
StatFactory.getStats(function(res){
console.log("callback");
});
}
What I have observed thus far is that it executes the asynchronous function initially, then creates the controller for the new state, and finally triggers the callback.
The function will update data within the factory, but the $scope remains unchanged.
I have considered possibly requiring $apply on the new $scope, but I am unsure how to do so.
Any suggestions? (I am still learning)