Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function() {
- 'use strict';
- angular.module('navigation-history-back-directive', [])
- .directive('navigationHistoryBack', function($window) {
- return {
- restrict: 'A',
- link: function postLink(scope, element) {
- element.on('click', function(e) {
- e.preventDefault();
- $window.history.back();
- scope.$apply();
- });
- }
- };
- });
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement