I have a loader.component.ts with the selector <app-loader>.
This Tag is in main-compontent.html and shows up.
<app-loader *ngIf="!showLoader === true">
I want, that the loader should just show up, while i fetching data.
I fetch data with following Code:
showLoader = true;
ngOnInit() {
this.httpService.getOffer()
.subscribe(
data => this.offers = data
)
this.showLoader = false;
}
As you can see, is the showLoader variable on true, and after fetching the data it should be false, but it don't works. What's wrong?