Created
September 5, 2017 13:56
-
-
Save karthikchintala1/d03bd8c4d6a9a22ef1472f21c5ac787f to your computer and use it in GitHub Desktop.
Initial todo item for todo app
This file contains 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 } from '@angular/core'; | |
@Component({ | |
selector: 'app-todo', | |
template: ` | |
<div> | |
<input type="text" placeholder="add a todo item here" [(ngModel)]="todotext"/> | |
<input type="submit" (click)="addItem()" value="Add Todo" /> | |
</div> | |
` | |
}) | |
export class TodoComponent { | |
todotext = ''; | |
addItem(): void { | |
//add the todotext to the todo list later | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment