Reputation: 4254
Hi I am building a iOS app using Appcelerator,
I have a file app.js
and a file webService.js
the file webService.js contains a function x
now from my app.js
file i want to call function x
that is present in the webService.js
file.
I searched a lot but i only found that using html..i am not using any html in it, it is just pure javascript.
Upvotes: 1
Views: 3691
Reputation: 21569
Ti.include
is deprecated since Titanium 3.3, and it doesn't work in my environment. If you are using coffee, try coffee-concat , though it's somehow ugly.
Upvotes: 0
Reputation: 8856
Include the file in app.js using :
Ti.include('path/webService.js');
and call the function.
Upvotes: 3