A simple AngularJS directive to properly handle possessive nouns.
Download the from here
bower install ng-proper-possessive
- Add ngProperPossessive.min.js to your main file (index.html)
<script type="text/javascript" src="bower_components/ng-proper-possessive/dist/ngProperPossessive.min.js"></script>
(Bower should inject the script into your project)
- Set
ngProperPossessive
as a dependency in your module
var myapp = angular.module('myapp', ['ngProperPossessive'])
- Add proper-possessive directive to the desired element, and set the 'name' attribute to the value you need to manipulate. Example:
<span proper-possessive name="{{user.name}}"></span>
This project was initially forked from the application template seed here https://github.com/refactorthis/angular-component-seed.git