durgesh.patle
durgesh.patle

Reputation: 720

Angular platform-browser has no exported member 'MouseEvent'

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';

It shows compilation error: enter image description here

I Guess MouseEvent is not longer available in 'PlatformBrowser', Is there any other way to get mouse positions ?

Thanks.

Upvotes: 0

Views: 1655

Answers (1)

Sajeetharan
Sajeetharan

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

Related Questions