Skip to content

Commit

Permalink
Step 21.34: Add images to the PartiesForm component
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha committed Nov 27, 2016
1 parent 2a77b4e commit 6e655d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client/imports/app/parties/parties-form.component.ts
Expand Up @@ -14,6 +14,7 @@ import style from './parties-form.component.scss';
export class PartiesFormComponent implements OnInit {
addForm: FormGroup;
newPartyPosition: {lat:number, lng: number} = {lat: 37.4292, lng: -122.1381};
images: string[] = [];

constructor(
private formBuilder: FormBuilder
Expand Down Expand Up @@ -47,11 +48,16 @@ export class PartiesFormComponent implements OnInit {
lat: this.newPartyPosition.lat,
lng: this.newPartyPosition.lng
},
images: this.images,
public: this.addForm.value.public,
owner: Meteor.userId()
});

this.addForm.reset();
}
}

onImage(imageId: string) {
this.images.push(imageId);
}
}

0 comments on commit 6e655d2

Please sign in to comment.