0.2.1 • Published 9 years ago

angular-directive-utils v0.2.1

Weekly downloads
3
License
GNU
Repository
github
Last release
9 years ago

angular-directive-utils

A series of directives for Angular 2.x so you don't have to write them.

Installation

First you need to install the npm module:

npm install angular-directive-utils --save

Usage

1. Import the DirectiveUtilModule:

It is advised you use: DirectiveUtilModule.forRoot()

import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {HttpModule} from '@angular/http';
import {DirectiveUtilModule} from 'angular-directive-utils';

@NgModule({
    imports: [
        BrowserModule,
        HttpModule,
        DirectiveUtilModule.forRoot()
    ],
    bootstrap: [AppComponent]
})
export class AppModule { }

4. Use the directives:

<input type="text" class="your-class" formControlName="exampleText" lowercase> </input>
<input type="text" class="your-class" formControlName="exampleText" uppercase> </input>
<input type="text" class="your-class" formControlName="exampleText" input-mask="**/**/****"> </input>

FAQ

The mask only takes *'s?

I'm still working on this, for now it is only formatted with * and any other character besides _ is allowed.

0.2.1

9 years ago

0.2.0

9 years ago

0.1.0

9 years ago

0.0.1

9 years ago