I'm probably missing something obvious here, but I'm out of ideas, so:
I have the following code:
app.run(function ($rootScope, $location, $anchorScroll, $stateParams, $timeout, $anchorScrollProvider) {
$rootScope.$on('$stateChangeStart',
function(newRoute, oldRoute) {
$timeout(function () {
$anchorScrollProvider.disableAutoScrolling();
$location.hash($stateParams.scrollTo);
$anchorScroll();
},
100);
});
});
I added the $anchorScrollProvider code today, and I'm getting the following error:
Error: [$injector:unpr] Unknown provider: anchorScrollProviderProvider <- anchorScrollProvider
Reading the documentation, it looks like $anchorScrollProvider is part of the base ng modules, which to me means the above should work, but why doesn't it?