2

What is the equivalent code for this in IONIC 5?

JQM Code: var EmployeeID = Apperyio('EMP_IDNo').val();

IONIC 5 Code: ??? let EmployID =

I haven't seen documentation regarding getting the using typescript in Ionic.

  • Assuming this is to get the value of `EMP_IDNo` field, in Ionic5 project in Appery, we can define a variable like `EmployeeID` on the page and set `[ngModel]` attribute to `EmployeeID`. We can then refer to this variable as `this.EmployeeID` in typescript blocks on this page. – plotnik Feb 18 '22 at 11:53

1 Answers1

3

To read values of input components in Appery.io apps, based on Ionic 5 you just need to read variables, which are used in the property [(ngModel)] of that input components:

  1. Define the variable enter image description here

  2. Select the input component and set the variable to its [(ngModel)] property

enter image description here

  1. Use the TypeScript to read this variable (value of the input component)

enter image description here

Serhii Kulibaba
  • 211
  • 2
  • 6