You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have just downloaded the production version and included it in my site, added as a dependency, set up an anchor with du-smooth-scroll but has no effect. Is there something more to configure?
It is injected:
var app = angular.module('app', [ ..., 'duScroll' ]);
...
function invertedEasingFunction(x) {
return 1-x;
};
angular.module('myApp', ['duScroll'])
.value('duScrollDuration', 2000)
.value('duScrollEasing', invertedEasingFunction)
.value('duScrollOffset', 30)
.controller('myCtrl', function($scope, $document) {
$document.scrollTopAnimated(400).then(function() {
console && console.log('You just scrolled to the top!');
});
...
The console doesn't show any js errors show I guess all is well... Inside the html: <a du-smooth-scroll="recipes" </a>
The recipes anchor exists. I used a directive to escape the angularjs's behavior as it doesn't handle simple href calls with hashes, because it transforms # to #/ and breaks the scroll to element... But this directive doesn't use smooth scroll. This is why I turned to this module. The directive that I use and works is:
Hello, I have just downloaded the production version and included it in my site, added as a dependency, set up an anchor with du-smooth-scroll but has no effect. Is there something more to configure?
It is injected:
The console doesn't show any js errors show I guess all is well... Inside the html:
<a du-smooth-scroll="recipes" </a>
The recipes anchor exists. I used a directive to escape the angularjs's behavior as it doesn't handle simple href calls with hashes, because it transforms # to #/ and breaks the scroll to element... But this directive doesn't use smooth scroll. This is why I turned to this module. The directive that I use and works is:
Do you have any suggestions to solve this issue of mine?
Thanks.
The text was updated successfully, but these errors were encountered: