Created
March 2, 2017 14:32
-
-
Save brunokrebs/f550d027ffece1c463ff00d1a12db6dc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, EventEmitter, Output } from '@angular/core'; | |
@Component({ | |
selector: 'app-task-form', | |
templateUrl: './task-form.component.html', | |
styleUrls: ['./task-form.component.css'] | |
}) | |
export class TaskFormComponent { | |
@Output() | |
taskAdded = new EventEmitter(); | |
public task: String = null; | |
addTask() { | |
this.taskAdded.emit(this.task); | |
this.task = null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment