Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hammer.js for Angular 2+ #1167

Open
VladislavLobakh opened this issue Mar 6, 2018 · 2 comments
Open

Hammer.js for Angular 2+ #1167

VladislavLobakh opened this issue Mar 6, 2018 · 2 comments

Comments

@VladislavLobakh
Copy link

I use hammer.js in my applications (Angular 2 and 5). I use events from this library, as example - tap. If I destroy any DOM-element with the help of *ngIf, there's subscription on the event. As a result, there's a reference to the DOM-object in the memory.

Example

How I can remove listener from this DOM-element?

without tap
with tap

@MickL
Copy link

MickL commented Mar 16, 2018

Using it with Angular, too and didn't know about this. Anyway wouldn't this be the same on normal plain js usage? If you remove the dom-element the reference will stay? Could you make a comparison with plain JS or jQuery?

@kykint
Copy link

kykint commented Mar 20, 2018

It is a bug in Angular:
angular/angular#22155
Pull request and workaround:
angular/angular#22156

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants