inorganik / ngx-countUp

Animates a numerical value by counting to it - for Angular
MIT License
138 stars 25 forks source link

how can i add the special character like '+', '-'? #7

Closed ghost closed 6 years ago

ghost commented 6 years ago

I saw the angular2 demo. hmm, it has the function to add the special character like +, -, and others. but it was not shown in the code. so i'd like to get that function(adding special character). please suggest your ideas.

Version info

Angular:
Angular CLI:
countup.js-angular2: 

Description

inorganik commented 6 years ago

could you give me an example? Like do you want it to count prefixed with a plus like +25?

ghost commented 6 years ago

@inorganik I mean like this 50+

inorganik commented 6 years ago

In the demo, it shows how to use all the options, including suffix which is a string appended to the end of number. The options object is passed to the countUp attribute:

<h1 [countUp]="{ suffix: '+' }" endVal="345">0</h1>
ghost commented 6 years ago

@inorganik okay. it was solved. thanks. 👍