I'm using Angular Scroll and once you hit a certain page I fire a function to scroll to an id. I'm getting the following error on the code below:
TypeError: $document.scrollToElement is not a function
initHelp();
function initHelp() {
console.log('initHelp');
$document.scrollToElement('#chart-help', 500).then(function() {
console && console.log('You just scrolled to chart-help!');
});
}
The docs from angular-scroll
.scrollTo( element [, offset, [, duration [, easing ] ] ] )
Alias of .scrollToElement.
.scrollToElement( element [, offset, [, duration [, easing ] ] ] )