So it should look something like this:
Javascript: my_script.js
require([
'underscore',
'jquery',
'backbone',
'../app/my_app/components/myComponent',
'splunkjs/mvc',
'splunkjs/mvc/simplexml/ready!'
], function (_,$,Backbone, myComponent, mvc) {
#Use your component
var my_comp = new myComponent();
my_comp.doStuff();
});
XML:
<form script="my_script.js">
...
</form>
... View more