Skip to main content

Questions tagged [require.js]

RequireJS is a JavaScript file and module loader. It is optimized for in-browser use, but it can be used in other JavaScript environments, like Rhino and Node.

2 votes
0 answers
191 views

breacrumb directive for angular-ui-router

This is a simple directive that creates breadcrumbs on the fly for Angular.js pages using angular-ui-router ...
Sibiraj's user avatar
  • 121
2 votes
0 answers
160 views

Setting up require.js for a static website and loading custom code

I am a new SO/SE user and I initially asked this question on SO, but i was 'sent' here -for some reason i don't clearly understand but anyway- so here I am..! I was actually curious about my require....
dimk's user avatar
  • 121
0 votes
1 answer
128 views

Change the switch code

there is a other way to write in JS the switch statement , This code is working :) ...
NSS's user avatar
  • 171
2 votes
1 answer
77 views

Rendering comments in a Backbone view

I want to make show/hide logic more maintainable in my codebase. Because they are too faraway located in separate js files, it hard for people to maintain. The flow in my codebase is: require.js ...
poc's user avatar
  • 605
3 votes
1 answer
295 views

Combat simulator - single page JavaScript with requirejs from a Java Applet

Single-page web app from Applet I'm seeking feedback on my first single-page web app using RequireJS and a web worker. I converted it from a Java applet, and the code is up on GitHub. It's a combat ...
Fuhrmanator's user avatar
1 vote
2 answers
2k views

Including the necessary polyfills for every combination of browser support

My project uses a Promise polyfill and the fetch polyfill, that I am only including if the browser does not yet support it ...
Nathan Jones's user avatar
2 votes
0 answers
134 views

Backbone/requireJs and circular dependencies

I'm trying to have a main App view with references of all my views to manage and call transitions between theses views. But, I have circular dependencies. app.js ...
Laurent's user avatar
  • 21
2 votes
1 answer
2k views

Cross-domain with requirejs text plugin

there is my implementation for cross domain call using the requireJs text plug-in htaccess file in the template folder of my cross-domain site ...
Frederic Nault's user avatar
4 votes
1 answer
292 views

Correctly rewriting Japanese verb conjugator in modular JS

For my first use of javascript I've made an app that takes an input verb from html in Japanese and outputs it in to many conjugated (manipulated) forms. Essentially, it defines an alphabet, some ...
cardboardtheory's user avatar
3 votes
0 answers
2k views

Using RequireJS correctly for social plugins

I'm a beginner in JavaScript and lately I've been trying things with RequireJS, I'd like to get some feedback on how good/poor my code is and in what ways it can be improved. My example below is just ...
Richard's user avatar
  • 39
4 votes
1 answer
189 views

Structure a webapp using RequireJS

I've written a small webapp in JavaScript, and am now essentially rewriting it to use RequireJS. I'm doing this partly to get more familiar with RequireJS (which I have little experience with), as ...
mzmm56's user avatar
  • 143
2 votes
1 answer
384 views

Using GeoComplete with RequireJS (with shim config)

I am using the GeoComplete plugin with RequireJS It works, but please could someone confirm I've done this correctly, mainly my understanding of shim: ...
Alex's user avatar
  • 137
4 votes
3 answers
437 views

Is there anything can be improved in this JavaScript module?

I am using RequireJS JavaScript library. I have the following JavaScript module define for dataservice: ...
user1740381's user avatar
7 votes
2 answers
358 views

Modular design with Require.js

I am trying to get a better understanding of the modular design pattern and I am using Requirejs to manage my dependencies. I understand separating code into modules (using define with RequireJS) so ...
alpha's user avatar
  • 173
6 votes
1 answer
3k views

Avoiding RequireJS circular dependencies

My app module bootstraps a Backbone.js application. I need app to be available in every other view for easy access to router, ...
Dan's user avatar
  • 1,486

15 30 50 per page