Skip to content

Instantly share code, notes, and snippets.

@rca
Created July 21, 2012 21:18
Show Gist options
  • Save rca/3157225 to your computer and use it in GitHub Desktop.
Save rca/3157225 to your computer and use it in GitHub Desktop.
index.html:
<div ng-controller="ClickyController">
<a href="#" class="btn btn-primary" ng-click="doSomething()">Click my!</a>
</div>
js/clicky.js:
function ClickyController($scope, $location) {
$scope.doSomething = function() {
$location.path('/foo');
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment