Reputation: 227
I have already tested this:
this.changedValue = document.getElementById("processID");
this.changedValueString = this.changedValue.value;
console.log("[INFO] Choosen processID: >" + this.changedValueString + "<");
Unfortunately, I get this with logcat:
[INFO:CONSOLE(56878)] "[INFO] Choosen processID: >undefined<"
Upvotes: 0
Views: 27
Reputation: 3233
use [(ngModel)] in your input element like this,
<input type="text" [(ngModel)]="inputValue" />
and in your component.ts,
export class Page{
inputValue:string;
constructor(){
console.log(this.inputValue)
}
}
Upvotes: 1