RequireJs Google maps google is not defined

I have a simple nodejs project that should load asynchronously the google maps api javascript, i followed this answer and my app.js is like this: var express = require("express"), app = express(), bodyParser

Use of Backbone.Collection fetch but value not included

I thought that initializing the collection returned a ready instance of Backbone.Collection. After the fetch, however, the collection contains some models, but in require, _this.serviceCollection.toJSON() gives me undefined object. My Backbone.Collec

RequireJS module load timeout when using bundles

Have require js working fine without the bundles. But whenever i use a bundle, i get timeouts for the modules i am trying to import. Here is how i build the bundles with the mvc bundler/minifier bundles.Add(new ScriptBundle("~/bundles/test&qu

ZeroClipboard and RequireJS - ZeroClipboard is not defined

I'm attempting to use ZeroClipboard inside an AngularJS/RequireJS Application. I have put ZeroClipboard.js into the location /assets/js/vendors/ZeroClipboard.js I have set up the main.js of the RequireJS application main.js requirejs.config({ paths:

Load Google Maps + MarkerWithLabel together?

Is anyone else using Google Maps + MarkerWithLabel + RequireJS? I basically want to see if it's possible to eliminate the extra http request for MarkerWithLabel and somehow optimize how everything is loaded and initialized. Right now I'm loading the

Backbone architecture with packages

I'm trying to choose a backbone architecture that will best serve my application. I am building a large application that will be composed of several components or "packages" that can be enabled or disabled. For simplicity, lets say my single-pag

Use reactjs with requirejs

Recently, I started using reactjs along with a backbonejs router to build an application. I usually use use requirejs for dependency and code management. But, problem arises when I try to include files that contain jsx syntax. This is what I have so

How to handle Requirejs 404 errors

I am currently trying to identify the best way to handle different errors within a Durandal application. One scenario I am testing is where the required module does not exist, i.e. define(['dummy'], function (Dummy) { return {}; }); where dummy does

Strange Requirejs Behavior When Loading Markdown

I have a requirejs module in which I am trying to load markdownjs. Here is the file: define(function(require) { 'use strict'; var Backbone = require('backbone'); var blogCollectionTemplate = require('hbs!app.templates/blog.collection.view'); var Blog

Using IBM Tealeaf, require.js, and single-page applications

Can IBM Teamleaf be used on a single page application? Can it also be incorporated with require.js so that it is automatically included once and then picks up all javascript events that are fired? I haven't used Tealeaf before, but our backend team d

How to use Kendo UI MVC Extensions with require js?

I have a controller that looks like this: using System.Collections.Generic; using System.Web.Mvc; using Kendo.Mvc.Extensions; using Kendo.Mvc.UI; namespace KendoMvcApplication.Controllers { public class HomeController : Controller { public ActionResu

How to get a global scope inside define function?

Can you get global scope while using strict mode and also making sure that you can run on non window environment. See these examples: define(['other', 'thing'], function() { // this === window in desktop environment // this === GLOBAL in node environ

prefix for loaded modules using requirejs

My application has different modules which ask for a files in following way : var urlRepository = require('modules/common/urlrepository/urlrepository'); also some modules are required using following way : require(['modules/common/urlrepository/urlre

TypeScript: import module with only instructions

I have a page-a.ts which would compile into page-a.js: alert('this is from page-a'); And I have a main.ts which compiles into main.js: import pageA = module('page-a') alert('this is from main'); And this is my tsc command line: tsc --module amd page-, Backbone and require.js

How can I load, Backbone, and with Require.js's shim config? It seems like everything else is loading just fine, just that when I attempt to run I get "Backbone is not defined". is served t

Can not read 'View' property of undefined

This is my first time to use require.js with backbone, and I'm struggling to find the problem with my view: Cannot read property 'View' of undefined // search.js:8 My directory structure is: . ├── index.php └── js ├── app.js ├── lib │ ├── backbone.js

RequireJS: local fallback if CDN fails

In my backbone app, I need to provide a fallback for each required file, in the case that the CDN that delivers them fails. I have tried overwriting require.onError like so: require.onError = function (err) { if (err.requireType === 'timeout') { var

Backbone-localstorage does not work with require.js

I'm trying to add localstorage to my collections in backbone.js, but for some reason, require.js wont load it. Here's what is in the main.js file that requirejs loads: require.config({ paths: { 'jquery': 'libs/jquery/jquery-1.7.1.min', 'underscore':

Why did Underscore.js remove support for AMD?

1.3.0 - Jan. 11, 2012 Removed AMD (RequireJS) support from Underscore. If you'd like to use Underscore with RequireJS, you can load it as a normal script, wrap or patch your copy, or download a forked version. Why have they done it? Does anyone know?

Unit tests in RequireJS and QUnit databases

I am just trying to get my head round unit testing in Javascript and RequireJS. I am building a web-app and obviously only want to have tests run in development not production builds. Questions: Do you just test when you want to, or do you have JS te