55# ngx-material-password-strength - Material password strength meter to indicate how secure is the provided password
66
77[ ![ npm version] ( https://badge.fury.io/js/ngx-material-password-strength.svg )] ( https://badge.fury.io/js/ngx-material-password-strength ) ,
8+ [ ![ npm] ( https://img.shields.io/badge/demo-online-ed1c46.svg )] ( https://anthonynahas.github.io/ngx-material-password-strength )
89[ ![ Coverage Status] ( https://coveralls.io/repos/github/anthonynahas/ngx-material-password-strength/badge.svg?branch=master )] ( https://coveralls.io/github/anthonynahas/ngx-material-password-strength?branch=master )
910[ ![ dependency Status] ( https://david-dm.org/anthonynahas/ngx-material-password-strength/status.svg )] ( https://david-dm.org/anthonynahas/ngx-material-password-strength )
1011[ ![ devDependency Status] ( https://david-dm.org/anthonynahas/ngx-material-password-strength/dev-status.svg?branch=master )] ( https://david-dm.org/anthonynahas/ngx-material-password-strength#info=devDependencies )
1112[ ![ Greenkeeper Badge] ( https://badges.greenkeeper.io/anthonynahas/ngx-material-password-strength.svg )] ( https://greenkeeper.io/ )
13+ [ ![ license] ( https://img.shields.io/github/license/anthonynahas/ngx-material-password-strength.svg?style=flat-square )] ( https://github.com/AnthonyNahas/ngx-material-password-strength/blob/master/LICENSE )
1214
1315<p align =" center " >
1416 <img alt="ngx-material-password-strength" style="text-align: center;"
@@ -22,6 +24,13 @@ View all the directives in action at https://anthonynahas.github.io/ngx-material
2224## Dependencies
2325* [ Angular] ( https://angular.io ) (* requires* Angular 2 or higher, tested with 2.0.0)
2426
27+ ### Requirements:
28+ - [ angular material ] ( https://www.npmjs.com/package/@angular/material )
29+ - [ angular material theme] ( https://material.angular.io/guide/getting-started#step-4-include-a-theme )
30+ - [ angular cdk ] ( https://www.npmjs.com/package/@angular/cdk )
31+ - if you need a built in theme --> please let me know
32+
33+
2534## Installation
2635Install above dependencies via * npm* .
2736
@@ -74,7 +83,51 @@ export class OtherModule {
7483
7584## Usage
7685
86+ add the ` ngx-material-password-strength ` element to your template:
87+
88+ ``` html
89+ <ngx-material-password-strength
90+ [password] =" password.value" >
91+ </ngx-material-password-strength >
92+ ```
93+
94+ This will display only the material password strength meter in form of a progress without any input conatiner
95+ or else.
96+
97+ In the following example, we integration a material input container with ` ngx-material-password-strength ` 's component.
98+
99+ ``` html
100+ <div >
101+ <mat-input-container floatPlaceholder =" auto" style =" width : 100% " >
102+ <input matInput #password
103+ [type] =" inputType"
104+ required
105+ placeholder =" Password" >
106+ <mat-hint align =" end" aria-live =" polite" >
107+ {{password.value.length}} / 25
108+ </mat-hint >
109+ </mat-input-container >
110+ <ngx-material-password-strength
111+ [password] =" password.value" >
112+ </ngx-material-password-strength >
113+ </div >
114+ ```
115+
116+ [ learn more about mat-input-container] ( https://material.angular.io/components/input/overview )
77117
118+ ## Development
119+
120+ To generate all ` *.js ` , ` *.d.ts ` and ` *.metadata.json ` files:
121+
122+ ``` bash
123+ $ npm run build
124+ ```
125+
126+ To lint all ` *.ts ` files:
127+
128+ ``` bash
129+ $ npm run lint
130+ ```
78131
79132## License
80133
0 commit comments