Runtime Terror
Runtime Terror

Reputation: 6742

Argument type MouseEvent is not assignable to parameter type MouseEvent

enter image description here

In Intellij v. 2018.3.2. I'm getting this error every time I pass the $event to a method.

In template I have:

<a href="#" (click)="toggle($event)">{{ header }}</a>

Then in class:

public toggle(event: MouseEvent): void {
    event.preventDefault();
}

Any idea what is going on?

Upvotes: 4

Views: 2151

Answers (1)

Runtime Terror
Runtime Terror

Reputation: 6742

It seems it's a bug in the IDE. I've submitted a ticket for it: youtrack ticket.

Upvotes: 1

Related Questions