Hi,
I work on a project for a big client, and the client developed a starterkit for UI compatible with the lateste AngularJS and Bootstrap 2.6.
The thing is that, for now, the StarterKit team has no script loader. They only make bundles, with no AMD scripts.
So, what I'm willing to do is :
1. put curl.js / require.js with AngularJS. I don't know exactly how to do that, because Angular has its own script loader I believe. Could you provide me some tips to begin with.
2. if possible, I would like to lazy load some of the assets I have. For that, I wanted to use wire.js. And according to some events (a click on a button for example), start downloading some specs.
How can we do that with curl.js and wire.js ?
For example, I have :
define({
// Create basic layout, 1st thing to load
layout: {
render: {
template: {
module: 'text!app/container.html'
},
css: {
module: 'css!app/css/styles.min.css'
}
},
insert: {
at: {
$ref: 'dom.first!body'
}
}
},
// After a click on a button, I want encaiss.html to be loaded, with some more modules, and insert it after the 'div id="gTab1"' DOM element, // contained in container.html
encaiss: {
render: {
template: {
module: 'text!app/encaiss.html'
},
},
insert: {
after: {
$ref: 'dom!gTab1'
}
}
},
// After a click on a button, I want valid.html to be loaded, with some more modules, and insert it after the 'div id="gTab2"' DOM element, // contained in encaiss.html, which is not loaded at the beginning.
valid: {
render: {
template: 'text!app/valid.html'
},
insert: {
after: {
$ref: 'dom!gTab2'
}
}
},
plugins: ['wire/dom', 'wire/dom/render']
});
3. I also need to test a lot of stuff automaticaly. So, for that purpose, I wanted to use requireJS and Karma (integrated in AngularJS I believe). Is there a recommanded way of doing that ?
Thanks by advance for your help guys.
Johan