0.0.2 • Published 2 years ago
@fabra/angular-fabra-connect v0.0.2
AngularFabraConnect
Getting Started
Run
npm install @fabra/angular-fabra-connectIn your root
app.module.ts, add:
import { FabraConnectModule } from "@fabra/angular-fabra-connect";
@NgModule({
...
imports: [
FabraConnectModule, ...
],
...
})- In the
<yourComponent>.component.tsfile of the component where you want to open Fabra Connect, add:
import { FabraConnectService } from "@fabra/angular-fabra-connect";
export class FabraComponent implements OnInit {
linkToken: string = "";
constructor(private fabraConnectService: FabraConnectService) { }
ngOnInit() {
this.fabraConnectService.initialize();
this.linkToken = "TEGg9rC3qu3aBPQypyShF9aVaVjZbc2JFpMxDltXEFY=";
}
onButtonClick() {
this.fabraConnectService.open(this.linkToken);
}
}- In the
<yourComponent>.component.htmlfile of the component where you want to open Fabra Connect:
<button (click)="onButtonClick()" class="button">Open Fabra Connect</button>- Import your component and use it to open Fabra Connect!
Build
Run ng build fabra-connect to build the project. The build artifacts will be stored in the dist/ directory.
Publishing
After building your library with ng build fabra-connect, go to the dist folder cd dist/fabra-connect and run npm publish.
Running unit tests
Run ng test fabra-connect 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 Overview and Command Reference page.