Hey i'm trying to create a simple navigation bar with a few link buttons. i want that when i click on a button, it will scroll to the right component. i know i can do it with jquery using ScrollTo() but with Angular i don't have all the HTML in 1 page. is it possible to make it work with angular ?
this fiddle describes the outcome i'm looking for :
$(document).ready(function() {
$('a[rel="relativeanchor"]').click(function(){
$('html, body').animate({
scrollTop: $( $.attr(this, 'href') ).offset().top
}, 500);
return false;
});
});