Ignore:
Timestamp:
11/04/21 23:10:39 (3 years ago)
Author:
Ema <ema_spirova@…>
Branches:
master
Children:
ceaed42
Parents:
6a80231
Message:

edit planner form with angular

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

Legend:

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

    r6a80231 r6c1585f  
    44    <p>Planner name</p>
    55    <mat-form-field appearance="fill">
    6       <input matInput required   type="text" [(ngModel)]="plannerDto.name" name="name" placeholder="Planner name">
     6      <input matInput required   type="text" [(ngModel)]="planner.name" name="name" placeholder="Planner name">
    77    </mat-form-field>
    88    <p>Planner description</p>
    99    <mat-form-field appearance="fill">
    10       <textarea matInput required name="description" [(ngModel)]="plannerDto.description" type="text" placeholder="Planner description"></textarea>
     10      <textarea matInput required name="description" [(ngModel)]="planner.description" type="text" placeholder="Planner description"></textarea>
    1111    </mat-form-field>
    1212  </div>
  • trip-planner-front/src/app/create-initial-planner/create-initial-planner.component.ts

    r6a80231 r6c1585f  
    4040  onFormSubmitPlanner(form: NgForm){
    4141   console.log(this.planner);
    42       this.plannerService.postInitialPlanner(this.plannerDto).subscribe(
     42      this.plannerService.postInitialPlanner(this.planner, this.locations).subscribe(
    4343        data=>{
    4444          console.log(data);
Note: See TracChangeset for help on using the changeset viewer.