0.2.1 • Published 10 years ago
syonet.namebeautifier v0.2.1
nameBeautifier
Beautifier for person names for Angular.js
{{ user.name | beautifyName }}
<!--
input: JOAO DA SILVA
output: Joao da Silva
-->Installation
Use Bower to grab the package:
bower install syonet.nameBeautifierThen, inject the module into your app:
angular.module( "app", [ "syonet.namebeautifier" ]);Usage
nameBeautifier can be used in two forms in an Angular app: filter and service.
As a filter
Simply use the beautifyName filter:
{{ user.name | beautifyName }}
<!--
input: JOAO DA SILVA
output: Joao da Silva
-->As a service
Inject the $nameBeautifier service into your controller/service:
.controller( "MyController", function ( $nameBeautifier, user ) {
$nameBeautifier.beautify( user.name );
})License
MIT
0.2.1
10 years ago