Answer the question
In order to leave comments, you need to log in
How to scroll to an AngularJs ID?
In the application I use angular-ui-router:
$stateProvider
.state('page', {
url: '/:node',
templateUrl: "app/page/page.html",
controller: "PageCtrl"
})
.state('page.comments', {
url: '#disqus_comment',
templateUrl: 'app/page/page.html',
controller: 'PageCtrl'
});
$locationProvider.hashPrefix('!');
$rootScope.$on('$stateChangeSuccess', function () {
$anchorScroll();
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question