Created
April 2, 2015 08:31
-
-
Save jeonghwan-kim/a3932b62d74cbcb452e2 to your computer and use it in GitHub Desktop.
$anchorScroll example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
angular.module('myApp') | |
.controller('FaqCtrl', function ($scope, $location, $anchorScroll) { | |
$scope.scrollTo = function(id) { | |
$location.hash(id); | |
$anchorScroll(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sdfdfdaD