Ignore:
Timestamp:
11/02/21 22:14:57 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
6c1585f
Parents:
188ee53
Message:

create initial planner and routing with angular

File:
1 edited

Legend:

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

    r188ee53 r6a80231  
    44import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
    55import { CreateInitialPlannerComponent } from '../create-initial-planner/create-initial-planner.component';
     6import { Router } from '@angular/router';
    67
    78
     
    1415
    1516  planners: Planner[];
    16   constructor(private plannerService: PlannerService, public dialog: MatDialog) {
     17  plannerId: number;
     18
     19  constructor(private plannerService: PlannerService, public dialog: MatDialog, private router: Router) {
    1720    this.planners = [];
     21    this.plannerId = 1;
    1822  };
    1923 
     
    3337  }
    3438 
     39  onClickEditPlanner(id: number){
     40    console.log(id);
     41   
     42         
     43          this.router.navigate(['edit/planner/', this.plannerId])
     44   
     45  }
    3546}
Note: See TracChangeset for help on using the changeset viewer.