Socket
Socket
Sign inDemoInstall

angular-weblineindia-password

Package Overview
Dependencies
10
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    angular-weblineindia-password

An AngularJS based Password Input component, which provides input field to add password as a text / password property with validation. The password value is automatically validated on change event. You can also disable password field using disable props.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

AngularJS - Password Input Component

An AngularJS based Password Input component, which provides input field to add password as a text / password property with validation. The password value is automatically validated on change event. You can also disable password field using disable props.

Table of contents

  • Browser Support
  • Demo
  • Getting started
  • Usage
  • Available Props
  • Methods
  • Want to Contribute?
  • Collection of Components
  • Changelog
  • License
  • Keywords

Browser Support

ChromeFirefoxSafariEdgeIE
83.0 ✔77.0 ✔13.1.1 ✔83.0 ✔11.9 ✔

Demo

Getting started

Install the npm package:

npm install angular-weblineindia-password
#OR
yarn add angular-weblineindia-password

If your angular verson is diffrent then install fontawesome :

Using ng add:

# See Compatibility table below to choose a correct version
$ ng add @fortawesome/angular-fontawesome@<version>

Using Yarn

$ yarn add @fortawesome/fontawesome-svg-core
$ yarn add @fortawesome/free-solid-svg-icons
# See Compatibility table below to choose a correct version
$ yarn add @fortawesome/angular-fontawesome@<version>

Using NPM

$ npm install @fortawesome/fontawesome-svg-core
$ npm install @fortawesome/free-solid-svg-icons
# See Compatibility table below to choose a correct version
$ npm install @fortawesome/angular-fontawesome@<version>
@fortawesome/angular-fontawesomeAngularng-add
0.1.x5.xnot supported
0.2.x6.xnot supported
0.3.x6.x && 7.xnot supported
0.4.x, 0.5.x8.xnot supported
0.6.x9.xsupported

Usage

Use the <angular-weblineindia-password> component:

import { NgModule } from '@angular/core';
import { PasswordModule } from 'angular-weblineindia-password';

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

Add typescript on .ts file

export class AppComponent {

 passwordValue: any = {
    value: "",
    placeholder: "Enter Password",
    name: "password",
    id: "password",
    disabled: "false",
    tabindex: "1",
    paswordMinLength: 3,
    passwordFieldType: 'password',
    paswordMaxLength:255,
    passwordErrorName:'The password field must be at least 3 characters'
  };

 onChangePassword(event) {
    if (event.target.value.trim() === "") {
      this.passwordValue.value = event.target.value
        .replace(/^[^-\s][a-zA-Z0-9_\s-]+$/, "")
        .trim();
    } else {
      this.passwordValue.value = event.target.value;
    }
  }

  onFocusPassword(event) {
    event.target.placeholder = "";
  }
  onBlurPassword(event) {
    event.target.placeholder = this.passwordValue.placeholder;
  }
}

Add html on .html file

<lib-password
  [placeholder]="passwordValue.placeholder"
  [name]="passwordValue.name"
  [value]="passwordValue.value"
  [id]="passwordValue.id"
  [disabled]="passwordValue.disabled"
  [tabindex]="passwordValue.tabindex"
  [paswordMinLength]="passwordValue.paswordMinLength"
  [paswordMaxLength]="passwordValue.paswordMaxLength"
  [passwordFieldType]="passwordValue.passwordFieldType"
  [passwordErrorName]="passwordValue.passwordErrorName"
  (change)="onChangePassword($event)"
  (focus)="onFocusPassword($event)"
  (blur)="onBlurPassword($event)"
></lib-password>

Available Props

PropTypedefaultDescription
paswordMinLengthNumber3min length for password
paswordMaxLengthNumber255max length for password
passwordFieldTypeStringpasswordfield type of password(like text or password)
passwordErrorNameStringThe password field must be at least 3 characterserror name for password
placeholderStringpasswordpassword placeholder
disabledBooleanfalsedisable password field
nameStringpasswordname for password field
tabindexNumber1password tabIndex
idStringpasswordname for password field
hideBooleanfalsefor hide password field
isViewPasswordBooleantrueTo hide/show eye icon
valueStringvalue for password

Methods

NameDescription
focusGets triggered when the password input field receives focus.
blurGets triggered when the password input field loses focus.
changeGets triggered every time password got changed.

Want to Contribute?

  • Created something awesome, made this code better, added some functionality, or whatever (this is the hardest part).
  • Fork it.
  • Create new branch to contribute your changes.
  • Commit all your changes to your branch.
  • Submit a pull request.

Collection of Components

We have built many other components and free resources for software development in various programming languages. Kindly click here to view our Free Resources for Software Development


Changelog

Detailed changes for each release are documented in CHANGELOG.md.

License

MIT

Keywords

angular-weblineindia-password, password-input, angular-components, angularjs, angularjs-component, password-input-component, angularjs-password-input, password-validation, angularjs-password-validation

Keywords

FAQs

Last updated on 17 Jul 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc