An open API service indexing awesome lists of open source software.

https://github.com/pocesar/angular-cleanmask

Angular helper directive to use the $viewValue of a ui-mask
https://github.com/pocesar/angular-cleanmask

Last synced: about 1 year ago
JSON representation

Angular helper directive to use the $viewValue of a ui-mask

Awesome Lists containing this project

README

          

AngularJS clean mask directive
=================

Angular helper directive to use the $viewValue of a ui-mask

## Why?

When you use `ui-mask` directive, you end up with a model with only numbers (for example).
You lose the format and everything, which is why you use `ui-mask` in the first place.

```html

```

You end up with:

```js
$scope.doh === '1234561234'
```

Not pretty.

## Usage

```js
angular.module('yourapp', ['ngCleanMask']);
```

```html

```

```js
$scope.yup === '(12) 3456-1234' // model is correct now!
```