I made a change in code.where I make changes.It is as follows:
.directive('offClick', ['$rootScope', '$parse', '$timeout', function ($rootScope, $parse, $timeout) {
$rootScope.$evalAsync(function () {
listener.cb(listener.scope, {
$event: event
});
$timeout(function () { listener.scope.$apply() })
});
If you want to make changes in the code. I'll also use the current version