You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a cool library. Thanks for building it. I've used it in multiple projects.
Currently, there is no way to reanimate the count up when the developer wants to do so. For example, the developer may want to be reanimating after every interval of some seconds. Or the developer may want to reanimate the countUp whenever the countUp is scrolled into view (especially when it is not among the first things the user sees on the page).
Making the private animate() method on the CountUpDirective public should solve this problem. This way the developer can use @ViewChild to select the directive and call animate when they want to.
I was surprised that the method in question was private. Didn't know what motivated making it private in the first place so that's why I opened this issue first, rather than sending a pull request with the change directly.
The text was updated successfully, but these errors were encountered:
the countUp instance itself is public, but calling start() on that will trigger a lot of change detection. I think your solution is better, make animate public. I don't know if there was ever a reason for making it private. Would you like to make a PR please?
Version info
Description
This is a cool library. Thanks for building it. I've used it in multiple projects.
Currently, there is no way to reanimate the count up when the developer wants to do so. For example, the developer may want to be reanimating after every interval of some seconds. Or the developer may want to reanimate the countUp whenever the countUp is scrolled into view (especially when it is not among the first things the user sees on the page).
Making the
private animate()
method on theCountUpDirective
public should solve this problem. This way the developer can use@ViewChild
to select the directive and call animate when they want to.I was surprised that the method in question was private. Didn't know what motivated making it private in the first place so that's why I opened this issue first, rather than sending a pull request with the change directly.
The text was updated successfully, but these errors were encountered: