Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
import { Component, OnInit } from '@angular/core';
import { NgxSpinnerService } from 'ngx-spinner';
import { finalize } from 'rxjs/operators'
import { AuthService } from '../../core/authentication/auth.service';
import { TopSecretService } from '../top-secret.service';
@Component({
selector: 'top-secret-index',
templateUrl: './index.component.html',
styleUrls: ['./index.component.scss']
})
export class IndexComponent implements OnInit {
claims=null;
busy: boolean;
constructor(private authService: AuthService, private topSecretService: TopSecretService, private spinner: NgxSpinnerService) {
}
ngOnInit() {
this.busy = true;
this.spinner.show();
this.topSecretService.fetchTopSecretData(this.authService.authorizationHeaderValue)
.pipe(finalize(() => {
this.spinner.hide();
this.busy = false;
})).subscribe(
result => {
this.claims = result;
});
}
}