Bills initially working just as proof of concept
ng linted modifier categories list is better at displaying data sanely now
This commit is contained in:
25
bookie/src/app/sales/home/sales-home.component.ts
Normal file
25
bookie/src/app/sales/home/sales-home.component.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {Subject} from 'rxjs';
|
||||
import {AuthService} from '../../auth/auth.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-sales-home',
|
||||
templateUrl: './sales-home.component.html',
|
||||
styleUrls: ['./sales-home.component.css']
|
||||
})
|
||||
export class SalesHomeComponent implements OnInit {
|
||||
public nameObject = new Subject<string>();
|
||||
|
||||
constructor(private auth: AuthService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.auth.userObservable.subscribe((user) => {
|
||||
if (user.isAuthenticated) {
|
||||
this.nameObject.next(user.name);
|
||||
} else {
|
||||
this.nameObject.next(null);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user