Skip to content

Instantly share code, notes, and snippets.

View shashibest's full-sized avatar

shashikant bhongale shashibest

View GitHub Profile
@jakemmarsh
jakemmarsh / directives.js
Created June 26, 2013 14:18
AngularJS directive to create a functional "back" button
app.directive('backButton', function(){
return {
restrict: 'A',
link: function(scope, element, attrs) {
element.bind('click', goBack);
function goBack() {
history.back();
scope.$apply();