Skip to content

Type {} ($event) is not assignable to type number #25

@AlleXyS90

Description

@AlleXyS90
<div counto
   (countoChange)="previousData.value = $event"
   [countFrom]="previousData.value"
   [countTo]="data.value"
   [duration]="1"> {{previousData.value | currency: " ":"symbol":"1.2-2" }} 
</div>

deps:
angular v11

The problem is that there is compared a number (previousData.value is a class field as number type) with an object ($event).

This is happening because strict mode is active, I think (angular.json strict value on true). Exists a solution without modifying the app configuration?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions