Angular Ordinal Number Filter
npm install angular-ordinal
{{numericalValue | ordinal}}
Converts e.g 1 -> 1st, 2 -> 2nd, 3 -> 3rd, 4 -> 4th.
Via npm (Recommended)
```terminal``
npm install --save angular-ordinal
This filter can also be installed through Bower:
`terminal`
bower install angularjs-ordinal-filter --save
Load the script:
`html`
Include the module as a dependency in your app:
`js`
angular.module('MyApp', ['ordinal']);
In your template:
`html`
{{numericalValue | ordinal}}
In your JS:
`js
angular.module('MyApp').controller('$scope', '$filter', function($scope, $filter) {
var ordinal = $filter('ordinal');
$scope.dayOfMonth = ordinal(1); // => 1st
});
``
Licensed under the MIT License.