Thursday, 18 May 2017

how to display an object on a click event in angular 2/4?

When i click a button i want to display a user name using interpolation into a waiting list. My html code for the button is here.

<button (click) = "onWaitListSubmit(user)">Add to waiting list</button>

<h2 class="page-header"></h2>

my appcomponent.ts code is here. How do i get the button to display the user name when i click it?

export class AppComponent{

"user": "name"

onWaitListSubmit(user){

}



via TexasState Han

No comments:

Post a Comment