What is the proper way to load an external javascript in Sencha Touch 2

前端 未结 4 1976
甜味超标
甜味超标 2020-12-08 22:37

In my development I need to include third part javascripts; like money.js (http://josscrowcroft.github.com/money.js/)

What is the best \'clean\'/\'proper\' way to ac

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-08 23:14

    pure javascript did the trick for me. I just included this block of code in the launch function

    var scriptTag = document.createElement('script'); scriptTag.src = 'specify the path here...'; document.body.appendChild(scriptTag);

    the scriptTag gets appended into the body of your index file

提交回复
热议问题