Added create component
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<button mat-raised-button class="float-right mb-3">
|
||||
<button mat-raised-button class="float-right mb-3" (click)="createComponent()">
|
||||
<mat-icon>add</mat-icon> Component</button>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -3,6 +3,7 @@ import {AngularFirestore} from 'angularfire2/firestore';
|
||||
import {map} from 'rxjs/operators';
|
||||
import {MatDialog} from '@angular/material';
|
||||
import {DeleteComponent} from '../../delete/delete.component';
|
||||
import {NewComponentComponent} from '../newComponent/newComponent.component';
|
||||
|
||||
@Component({
|
||||
selector: '',
|
||||
@ -26,6 +27,10 @@ export class ViewComponents {
|
||||
);
|
||||
}
|
||||
|
||||
createComponent() {
|
||||
this.dialog.open(NewComponentComponent);
|
||||
}
|
||||
|
||||
delete(component) {
|
||||
this.dialog.open(DeleteComponent, {data: component});
|
||||
}
|
||||
|
Reference in New Issue
Block a user