Ignore:
Timestamp:
10/16/21 18:10:51 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
eed0bf8
Parents:
6a3a178
Message:

adding new components

Location:
trip-planner-front/src/app/planner
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trip-planner-front/src/app/planner/planner.component.html

    r6a3a178 rfa375fe  
     1
     2<button mat-raised-button (click)="openDialog()">Create initial planner</button>
     3
    14<mat-grid-list cols="4" rowHeight="250px">
    25  <mat-grid-tile *ngFor="let planner of planners" >
  • trip-planner-front/src/app/planner/planner.component.ts

    r6a3a178 rfa375fe  
    22import { Planner } from '../_models/planner';
    33import { PlannerService } from '../_services/planner.service';
     4import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
     5import { CreateInitialPlannerComponent } from '../create-initial-planner/create-initial-planner.component';
     6
    47
    58@Component({
     
    1114
    1215  planners: Planner[];
    13   constructor(private plannerService: PlannerService) {
     16  constructor(private plannerService: PlannerService, public dialog: MatDialog) {
    1417    this.planners = [];
     18  };
     19 
     20  openDialog(): void {
     21    const dialogRef = this.dialog.open(CreateInitialPlannerComponent, {
     22      width: '250px',
     23      data: {}
     24    });
    1525  }
    16 
     26 
    1727  ngOnInit(): void {
    1828    this.plannerService.getAllPlanners().subscribe(
     
    2232    );
    2333  }
    24 
     34 
    2535}
Note: See TracChangeset for help on using the changeset viewer.