Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

local reference in angular

// app.component.html
<input type="text" #nameInput>
<button (click)="onClick(nameInput)">Add</button>

// app.component.ts
 onClick(nameInput: HTMLInputElement){
    alert(nameInput.value);
  }
Source by angular.io #
 
PREVIOUS NEXT
Tagged: #local #reference #angular
ADD COMMENT
Topic
Name
1+5 =