Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View shashibest's full-sized avatar

shashikant bhongale shashibest

View GitHub Profile
@shashibest
shashibest / directives.js
Created February 9, 2017 05:09 — forked from jakemmarsh/directives.js
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();