This project was generated with Angular CLI version 12.2.5.
Install with NPM
npm i alexvb1990-testing-library
This library contains all the necessary dependencies to work with your project, however you need to add this into your project; please follow the next steps so you can use them all around your project.
You need to add the next lines into the scripts and styles.
"styles": [
"./node_modules/alexvb1990-testing-library/src/assets/styles/main.scss"
],
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/@popperjs/core/dist/umd/popper.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js"
]
You need to add the next line into the main module or if you have a shred module you need to put it there.
import {MyLibModule} from "alexvb1990-testing-library";
You need to call the HTML element, in this we need to add the value in the SHOW ID parameter and that's it.
<lib-my-lib [showId]="335" class="d-block text-center py-2"></lib-my-lib>
If you want to use the web service in any part of you code here's a quick example of how to use it.
import {Component} from '@angular/core';
import {Observable} from "rxjs";
import {Show, MyLibService} from "alexvb1990-testing-library";
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
show$?: Observable<Show>;
constructor(private myLibService: MyLibService) {
this.show$ = this.myLibService.getShow(336);
}
}
If you have any feedback, please reach out to us at sing alexvb1990@gmail.com