AngularJs Glattes Scroll -CSS

//in angularjs controller
$scope.gotoDiv = function (anchor) {
        if ($location.hash() !== anchor) {
            $location.hash(anchor);

        } else {
            $anchorScroll();
        }
};
Charbel Imad