-
as seen on Stack Overflow
- Search for 'Stack Overflow'
We use jquery and requirejs to create a 'viewmodel' like this:
define('vm.inkoopfactuurAanleveren',
['jquery', 'underscore', 'ko', 'datacontext', 'router', 'messenger', 'config', 'store'],
function ($, _, ko, datacontext, router, messenger, config, store) {
var
isBusy = false,
…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I had javascript code in a single JS file that was working fine (using XHR/AJAX). When I split it up into separate modules in a requirejs application, I do not seem to get a handle on the event object & it shows up as undefined (testing in firefox 29.0.1).
Calling module:
ajax.onreadystatechange…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am unsure how I use namespaces in an modularized (RequireJs) Backbone environment.
I have thought a bit how it could look like but am totally unsure if this is the right way.
app.js (getting executed by main.js)
define('App', ['underscore', 'backbone', 'Router'], function( _, Backbone, Router){
…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm trying to use the Youtube Iframe API inside a module definded with Require JS. As this API is loaded async and calls a function once is loaded, I used a requireJS plugin called "async", that worked before with google maps api.
However, this time something isn't working. My module starts this…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am using require.js 2.0.
I have the following code that is called initially by require: app.js
requirejs.config({
paths: {
app: '..',
spine: 'spine_src/spine',
cs: "cs",
},
shim: {
'spine_src/route': {
deps: ['spine']
}
…
>>> More