Reputation: 720
I am creating an angular 2 example to get mouse position and do some stuff according to mouse position (clientX).
I've found this example to get mouse positions. As shown in this example, I tried to import MouseEvent from platformBrowser as below:
import {MouseEvent} from '@angular/platform-browser';
I Guess MouseEvent is not longer available in 'PlatformBrowser', Is there any other way to get mouse positions ?
Thanks.
Upvotes: 0
Views: 1655
Reputation: 222572
You do not have to import ,
Remove this line,
import {MouseEvent} from '@angular/platform-browser';
You can just use
private event: MouseEvent;
Upvotes: 1