Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.js"></script>
</head>
<body ng-app="myModule">
  <div id="test" ng-controller="myController as vm">
    <a href="#" ng-click="vm.click($event)">click</a>
  </div>
  <script>
    window.onerror = function () {
      console.log('get error')
    }
    angular.module('exceptionOverride', []).factory('$exceptionHandler',
      function() {
        return function(exception, cause) {
          exception.message += 'Angular Exception: "' + cause + '"';
          throw exception;
        };
      }
    );
    angular.module('myModule', ['exceptionOverride'])
      .controller('myController', [function () {
        this.click = function (event) {
          yoyoyo();
          event.preventDefault();
        }
      }])
  </script>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x