Skip to content

Commit

Permalink
Step 21.33: Emit event with the new file
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha authored and DAB0mB committed Dec 14, 2016
1 parent 9845f15 commit 15c9bc7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/imports/app/parties/parties-upload.component.ts
@@ -1,4 +1,4 @@
import {Component, OnInit} from '@angular/core';
import {Component, OnInit, EventEmitter, Output} from '@angular/core';

import template from './parties-upload.component.html';
import style from './parties-upload.component.scss';
Expand All @@ -21,6 +21,7 @@ export class PartiesUploadComponent implements OnInit {
files: Subject<string[]> = new Subject<string[]>();
thumbsSubscription: Subscription;
thumbs: Observable<Thumb[]>;
@Output() onFile: EventEmitter<string> = new EventEmitter<string>();

constructor() {}

Expand Down Expand Up @@ -65,5 +66,6 @@ export class PartiesUploadComponent implements OnInit {
addFile(file) {
this.filesArray.push(file._id);
this.files.next(this.filesArray);
this.onFile.emit(file._id);
}
}

0 comments on commit 15c9bc7

Please sign in to comment.