izupet / angular2-counto

Angular 2 package for nice count animations
MIT License
40 stars 13 forks source link

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

Open AlleXyS90 opened 3 years ago

AlleXyS90 commented 3 years ago
<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?

izupet commented 3 years ago

Hello, I have no time to work on this project so if you have a solution please create PR or you can fork it and fix it for yourself.

V V tor., 14. sep. 2021 ob 10:59 je oseba Alexandru Tudor < @.***> napisala:

     ```

{{previousData.value | currency: " ":"symbol":"1.2-2" }}



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?

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/izupet/angular2-counto/issues/25>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOFKXNMNEFHX3TU6FWYJNTUB4FHDANCNFSM5D7UW34A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.