Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
wip 20d7ba6 Mar 27, 2019
1 contributor

Users who have contributed to this file

33 lines (28 sloc) 935 Bytes
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;
});
}
}
You can’t perform that action at this time.