Currently implementing Angular Scroll and when reaching a specific page, I trigger a function to scroll to an ID. Encountering the following error in the code snippet 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!');
});
}
Referencing the documentation from angular-scroll
.scrollTo( element [, offset, [, duration [, easing ] ] )
Alias of .scrollToElement.
.scrollToElement( element [, offset, [, duration [, easing ] ] ] )