Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
aludin
Posts: 17
Registered: ‎02-04-2013
My Device: BB10
My Carrier: NA

Importing javascript in main.qml from other file does not seem to work

Hi,

 

I m trying to import some javascript from a file located under assets in the same directory as my main.qml as described here: https://developer.blackberry.com/cascades/documentation/dev/javascript/index.html

 

Nothing happens and the UI hangs...am I missing something?

 

under assets:

main.qml

test.js

 

At the top of main.qml, I have:

 

import "test.js" as TestEngine

 

On the other hand putting the javascript directly in main.qml works

 

Please use plain text.