@gauravumrani/nglogin
v1.0.0
Published
Angular 2+ Simple and minimal login component ![N|Solid](http://i63.tinypic.com/rkxx7d.png) ## Installation
Downloads
3
Readme
ngLogin
Angular 2+ Simple and minimal login component
Installation
Install it from
npm
npm install ngLogin
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
| Name | Type | | ------ | ------ | | ngLoginSettings | Input | | ngLoginResponse | Output |
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