0

I have a challenge, I am building somewhat of a library which containts folders and files, when selecting these I want the proper messages to pop up, like:

1 file and 1 folder selected -or- 3 files and 2 folders selected

I figured this would be easy with ng-pluralize

This is what I have so far:

<ng-pluralize count="amountSelected()"
    when="{'0': '',
           'one': '1 file is selected.',
           'other': '{} files are selected.'}">
</ng-pluralize>

The amountSelected() returns the number of selected files, folderSelected() would return the amount of selected folders but I don't know where to place it.

Any help is much appreciated.

Greetings,

Bram

Nurjan
  • 5,889
  • 5
  • 34
  • 54
B.Wesselink
  • 63
  • 12

0 Answers0