Z
Z
zachfischer2018-07-10 08:59:43
Angular
zachfischer, 2018-07-10 08:59:43

How to change select mask?

I have this list:

<select>
  <option type="number" maxlength="4"  *ngFor="let date of dates">
      {{date.year }}
  </option>
</select>

And in the list, the data is displayed in this format 2018.0. How can I fix this so that it was just 2018?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shvets, 2018-07-10
@zachfischer

{{ date.year | number: '.0-0' }}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question