1.0.0 • Published 6 years ago

@gauravumrani/nglogin v1.0.0

Weekly downloads
2
License
MIT
Repository
-
Last release
6 years ago

ngLogin

Angular 2+ Simple and minimal login component N|Solid

Installation

  1. Install it from npm npm install ngLogin

  2. Include NgLoginModule into your application.

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';`
import { NgLoginModule } from './modules/login/login.module';
@NgModule({
  imports: [
    BrowserModule,
    NgLoginModule
  ],
  declarations: [ AppComponent ],
  exports: [ AppComponent ]
})
export class AppModule {}

Example

<app-login [ngLoginSettings]="settings" (ngLoginResponse)="checkOutput($event)"> </app-login>

Attributes

Note:- These Attributes are compulsory, there is no default values

NameType
ngLoginSettingsInput
ngLoginResponseOutput

ngLoginSettings

This contains an object and has follwing keys

settings={
    passwordOptions:{
      regex: /^\w{3,20}$/,
      errorMsg: "The password must be between 3 to 20 characters"
    },
    emailOptions: {
      regex: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
      errorMsg: "Please Provide a valid email"
    },
    bgImage:""
  }

and then pass this settings object to ngLoginSettings input