tomastrajan / angular-ngrx-material-starter

Angular, NgRx, Angular CLI & Angular Material Starter Project
https://tomastrajan.github.io/angular-ngrx-material-starter
MIT License
2.83k stars 917 forks source link

Use NgPlural in Todos component #362

Closed tomastrajan closed 6 years ago

tomastrajan commented 6 years ago

Describe the feature you'd like:

We should use ngPlural for description of todos filter based on amount of items

Other information:

Please check NgPlural documentation.

We will be replacing

<mat-chip [disabled]=true>
            {{ 'anms.examples.todos.filter.description' | translate }} {{todos.filter !==
            'ALL' ? filteredTodos.length : ''}}
            {{ ('anms.examples.todos.filter.' + todos.filter.toLowerCase() |
            translate).toLowerCase() }}
            {{todos.filter === 'ALL' ? filteredTodos.length : ''}}
            {{ 'anms.examples.todos.filter.items' | translate }}
</mat-chip>

part of todos-container.component.html.

Please use translate for all ngPlural cases, we should be aiming for =0, =1 and >1.