toggle status lists
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
<app-status-toggle></app-status-toggle>
|
||||
<app-folder-list></app-folder-list>
|
||||
<app-device-list></app-device-list>
|
||||
<app-status-toggle (statusEvent)="onToggle($event)"></app-status-toggle>
|
||||
<app-folder-list *ngIf="currentStatus===status.Folders"></app-folder-list>
|
||||
<app-device-list *ngIf="currentStatus===status.Devices"></app-device-list>
|
||||
@@ -1,4 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Status } from '../status';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-status-list',
|
||||
@@ -6,10 +8,16 @@ import { Component, OnInit } from '@angular/core';
|
||||
styleUrls: ['./status-list.component.scss']
|
||||
})
|
||||
export class StatusListComponent implements OnInit {
|
||||
public currentStatus: Status = Status.Folders;
|
||||
public status = Status;
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
onToggle(s: Status) {
|
||||
console.log("holy moly", s);
|
||||
this.currentStatus = s;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user