@nowzoo/ngx-password-toggle

A password toggle component for Angular.

Project & README | Demo | Demo Source Code | Documentation

Quick start

npm i @nowzoo/ngx-password-toggle --save

Import the module...

import { NgxPasswordToggleModule } from '@nowzoo/ngx-password-toggle';

@NgModule({
  imports: [
    NgxPasswordToggleModule
  ],
})
export class AppModule { }

Use the component...

<p>
  <input
    type="password"
    name="password"
    value="Super Secret"
    #passwordInput
    class="form-control">
</p>
<p>
  <ngx-password-toggle [input]="passwordInput"></ngx-password-toggle>
</p>

<p>
  Change the labels...
</p>

<p>
  <input
    type="password"
    name="password"
    value="Super Secret Something"
    #passwordInput2
    class="form-control">
</p>
<p>
  <ngx-password-toggle
    [input]="passwordInput2"
    hideLabel="Hide the password"
    showLabel="Show the password"></ngx-password-toggle>
</p>

Contributing

Clone the main repo and npm install...

git clone https://github.com/nowzoo/ngx-libs.git
cd ngx-libs
npm i

The library files are in projects/ngx-password-toggle.

The demo code is in projects/ngx-password-toggle-demo.

Building the library...

ng build ngx-password-toggle

Testing the library...

ng test ngx-password-toggle

To test with Wallaby, use the wallaby.js config at the root of the project directory.

Serving the demo...

# make sure you've built the library locally first with ng build ngx-password-toggle
ng serve ngx-password-toggle-demo

Issues

Please submit issues to the main repo here.

License

MIT

result-matching ""

    No results matching ""