Skip to content

Commit

Permalink
Restore #102 with further improvements by @assafganor
Browse files Browse the repository at this point in the history
Fix #138
  • Loading branch information
thenikso committed Jan 29, 2018
1 parent 5cece25 commit 389aa64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions angular-inview.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,9 @@ function signalFromEvent (target, event) {
subscriber(e);
};
var el = angular.element(target);
el.on(event, handler);
event.split(' ').map(e => el[0].addEventListener(e, handler, true));
subscriber.$dispose = function () {
el.off(event, handler);
event.split(' ').map(e => el[0].removeEventListener(e, handler, true));
};
});
}
Expand Down

3 comments on commit 389aa64

@lbthomsen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This syntax fails with grunt-contrib-uglify.

@jamesdavieswales
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just letting you know IE11 doesnt cover fat arrows on windows 10

@ideadapt
Copy link

@ideadapt ideadapt commented on 389aa64 Nov 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @jamesdavieswales already said, arrow functions are not supported by IE11. Ironically this "improvement" commit was motivated by a change applied to fix an IE11 problem :).
For now, this circumstance prevents me from upgrading to the latest version (>=2.3).

Would you mind to use a function expression instead?

Please sign in to comment.