Ionic 3 Basics?!?

Hi,

I am new to Ionic 3 so apologise for the stupid question :)

I have a [Server Code] script to write an entry to database but can't work out how to invoke it and pass variables fusing Ionic 3.

From the snippet (or dragging the Server Code service into the function) I get...

--------------->

this.createWorkout.execute({ // change 'createWorkout' to actual variable name
data: {},
params: {},
headers: {}
}).subscribe(
(res: any) => {
console.log(res);
},
(err: any) => {
console.log(err)
}
)

--------------->

1. I am not sure what is means with the comment "change 'createWorkout' to actual variable name".

2. When run I get a TypeScript Error stating "Property 'CreateWorkout' does not exist on type 'Screen2'" .

I have no idea where to turn with this one :(.

Any sample code based on the above would be massively appreciated.

Regards,

Ryan.
1 person has
this question
+1
Reply
  • Hello Ryan,

    Please add service to the page:

    Then select the needed service:

    Add variable with service type:

    And use this name (on the provided screenshot it is tmp1_zzz_list) in the code.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited