0.0.1 • Published 3 years ago

login-lib-vit v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

CustomLib

This library was generated with Angular CLI version 8.2.14.

Code scaffolding

Run ng generate component component-name --project custom-lib to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project custom-lib.

Note: Don't forget to add --project custom-lib or else it will be added to the default project in your angular.json file.

Build

Run ng build custom-lib to build the project. The build artifacts will be stored in the dist/ directory.

Publishing

After building your library with ng build custom-lib, go to the dist folder cd dist/custom-lib and run npm publish.

Running unit tests

Run ng test custom-lib to execute the unit tests via Karma.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

Mandatory

In parent application need to install angular material(ng add @angular/material)

How to use library?

parent.html

<lib-login (getData)='displayLoginDetails($event)' (navigateToForgotPwd)="navigate($event)" backgroundImage="backgroundImage" (navigateToSignup)="navigateToSignup($event)" logo="logo">

parent.ts

backgroundImage: any = './../../assets/images/background.jpg'; //(Should pass background image URL) logo: any = './../../assets/images/logo.jpg'; //(Should pass logo image URL) displayLoginDetails(value) { //Inside value parameter user will get user name and password }

navigate(value) { //user will get forgot password response }

////user will get sign up response navigateToSignup(value) { }

cheild.ts @Input() backgroundImage: any; @Input() logo: any; @Output() getData = new EventEmitter(); @Output() navigateToForgotPwd = new EventEmitter(); @Output() navigateToSignup = new EventEmitter();