Advertisement
Guest User

Untitled

a guest
Apr 26th, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. (function() {
  2. 'use strict';
  3. angular.module('navigation-history-back-directive', [])
  4.  
  5. .directive('navigationHistoryBack', function($window) {
  6. return {
  7. restrict: 'A',
  8. link: function postLink(scope, element) {
  9. element.on('click', function(e) {
  10. e.preventDefault();
  11. $window.history.back();
  12. scope.$apply();
  13. });
  14. }
  15. };
  16. });
  17. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement