Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
leandromonaco committed May 9, 2022
2 parents fdc08bc + 2b4a660 commit 14adfa9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
7 changes: 6 additions & 1 deletion TeamHub/src/TeamHub.Web/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<h1>{{title}}</h1>
<h1>{{data.title}}</h1>

<ul>
<li *ngFor="let employee of employees">{{employee.Id}} - {{employee.Name}}</li>
</ul>


<input title="test2" class="demo" value="test" (click)="onInputClicked()" />
<input title="test2" class="demo" [value]="data.title" #titleInput (keyup)="onKeyUp(titleInput.value)"/>
<div [innerHTML]="data.title"></div>
14 changes: 13 additions & 1 deletion TeamHub/src/TeamHub.Web/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ import { Component } from '@angular/core';
export class AppComponent implements OnInit
{

title = 'Team Hub';
data = {
title: 'Team Hub'
};

employees: any;

constructor(private http: HttpClient) { }
Expand Down Expand Up @@ -41,4 +44,13 @@ export class AppComponent implements OnInit
return await this.http.get('https://localhost:7209/token', { responseType: 'text' }).toPromise();
}

onInputClicked()
{
alert('input clicked');
}

onKeyUp(newTitle:string){
this.data.title = newTitle;
}

}

0 comments on commit 14adfa9

Please sign in to comment.