0

I can include 1 js file with Ti.include like:

Ti.include("login.js")

But, i am having problem with including multiple js files. As a work around, i write Ti.include multiple times, which is less readable.

Any idea, how to achieve that?

3 Answers 3

5

Tweetanium does it like so:

Ti.include(
    '/tweetanium/ui/ui.js',
    '/tweetanium/model/model.js',
    '/tweetanium/config/config.js'
);
Sign up to request clarification or add additional context in comments.

1 Comment

1

Generally we should avoid including js file. It will hamper performance. You can have common js functionality to call any function defined in other files..

Comments

0

var All = require('ui/common/All');

    Tree = require('ui/common/Tree');
    EBOM = require('ui/common/E-BOM');
    MBOM = require('ui/common/M-BOM');
    SBOM = require('ui/common/S-BOM'); 

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.