Skip to content

Commit

Permalink
Update app to have edit buttons next to each task.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristen Kulha and LDMacKrell committed Oct 24, 2017
1 parent 92fc47e commit 1f0bf6e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Component } from '@angular/core';
<h1>To Do List for {{month}}/{{day}}/{{year}}</h1>
<h3>{{currentFocus}}</h3>
<ul>
<li *ngFor="let currentTask of tasks">{{currentTask.description}}</li>
<li *ngFor="let currentTask of tasks">{{currentTask.description}} <button (click)="editTask()">Edit!</button></li>
</ul>
</div>
`
Expand All @@ -24,6 +24,10 @@ export class AppComponent {
new Task('Begin brainstorming possible JavaScript group projects'),
new Task('Add README file to last few Angular repos on GitHub')
];

editTask() {
alert("You just requested to edit a Task!");
}
}

export class Task {
Expand Down

0 comments on commit 1f0bf6e

Please sign in to comment.