Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ng-milk/angular-capitalize-filter
Angular filter that capitalizes each word in a string, quick demo here: http://ng-milk.github.io/angular-capitalize-filter/
https://github.com/ng-milk/angular-capitalize-filter
angular-filter angularjs javascript
Last synced: 3 months ago
JSON representation
Angular filter that capitalizes each word in a string, quick demo here: http://ng-milk.github.io/angular-capitalize-filter/
- Host: GitHub
- URL: https://github.com/ng-milk/angular-capitalize-filter
- Owner: ng-milk
- License: mit
- Created: 2015-09-14T14:22:24.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-05T19:14:24.000Z (about 8 years ago)
- Last Synced: 2024-10-07T07:03:00.399Z (4 months ago)
- Topics: angular-filter, angularjs, javascript
- Language: HTML
- Homepage:
- Size: 6.84 KB
- Stars: 6
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Angular capitalize filter
### [Quick Demo](http://ng-milk.github.io/angular-capitalize-filter/)
Angular filter that capitalizes each word in a string, read about it on [here](https://ngmilk.rocks/2015/04/03/angularjs-filter-that-capitalizes-each-word-in-a-string/).
CSS is fairly powerful, but it can only capitalize words that aren't uppercase. The `text-transform:capitalize` property won't change anything in a string like **CAN'T GET ME CSS**. Use this directive to achieve consistent capitalization of each word in a given string.## Usage
1. Include `ng-capitalize.js`.
2. Add `dm.capitalize` as a dependency to your app.
3. Profit!## Bower
Installable via `bower`:```bash
bower install ng-capitalize
```## Npm
Installable via `npm`:```bash
npm install ng-capitalize-filter --save
```## Example
See [index.html](https://github.com/ng-milk/angular-capitalize-filter/blob/master/index.html) for an example.```html
angular.module('app', ['dm.capitalize']);
- {{'MOUNTAIN' | capitalize}}
- {{'MOUNTAIN DOOM' | capitalize}}
```
## About ngmilk
**ngmilk** is the place to go for fresh front-end articles, with a focus on AngularJS.
See more on [ngmilk.rocks](https://ngmilk.rocks)
Follow [@ngmilkrocks](http://twitter.com/ngmilkrocks) on Twitter to stay ahead of the game.