0

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<"

2
  • I'd recommend you to take a look at Angular docs since you're trying to do things in an old jquery way but things are done in a different way when working with Angular. That would help you to improve the performance of your apps (which is extremely important when it comes to Ionic apps). Commented Jun 29, 2017 at 15:06
  • 1
    Okey, i'll check this out. Thank you. Commented Jun 29, 2017 at 15:20

1 Answer 1

1

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)
  }
}
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.