Questions tagged as 'requirejs'

2
answers

Use Jquery library with AngularAMD

I'm implementing AngularJS + RequireJs through AngularAMD. I want to add the Jquery library but it returns the following error when I use "$":    Error: $ is not defined I have main.js set up as follows: require.config({ baseUrl:...
asked by 21.04.2015 / 20:28
1
answer

Loading old libraries in RequireJS

What is the best way to configure old libraries that were not built using the AMD specification? I am referring to libraries that were not defined with the define () statement. In this case, I'm trying to load the JQuery 1.4 library. I read...
asked by 02.03.2015 / 21:56
1
answer

How to configure Require.JS

Hello people, I'm in doubt to set up RequireJS correctly, but I also have doubts about organizing Trees to set baseUrl and so I'll demonstrate how I'm setting up: . ├── index.html ├── js │ ├── boot.js │ ├── main.js │ ├──...
asked by 06.07.2016 / 04:56
0
answers

How to modularize an app made in Sammy.js with Require.js or "module pattern"?

I have an app (mobile app) written in Sammy.js with 4 routes. Each route has 40 to 70 lines of code and a evento bindado . Writing everything in a single callback of app is turning into a beautiful pasta because these events (...
asked by 17.02.2015 / 01:04
1
answer

What is the difference between PATHS and MAP properties of RequireJS

In theory it seems that the two configuration properties of RequireJS focus on the same action. Does anyone know the differences in how both settings work? PATHS: require.config({ paths: { 'modulo': 'endereco/para/o/modulo' }...
asked by 28.02.2014 / 19:34
1
answer

Build javascript modules, how to package (modules)?

I'm using require js and want to optimize requests by reading documentation in github , I know you can set up a task in Grunt to concatenate my modules plus I'm a bit confused on how to set up this task and how exactly it will work. Structu...
asked by 31.08.2015 / 03:13
1
answer

RequireJS data-main does not work

Hello I'm always getting the same message when trying to run my index.html file that attempts to reload jQuery from requireJS.    /TestRequire/jquery.js net :: ERR_FILE_NOT_FOUND Error: Script error   for "jquery" link index.html &...
asked by 06.10.2016 / 15:58
1
answer

Load dependencies on demand

I understand by dependency, the need for your script to need or is accessing in some way some method / property or properly an object encapsulated in another javascript file, be it a framework or not! Right? Based on this principle, I initial...
asked by 27.03.2015 / 01:51
1
answer

Test ViewModel KnockOut with CucumberJs

I have the feature definition as follows: Feature: Shoper can add an item to ShoppingCart Scenario: First item added to ShoppingCart Given I have an Empty ShoppingCart When I add an Item to ShoppingCart Then The ShoppingCart mus...
asked by 02.07.2014 / 04:29
3
answers

Doubt about loading modules with requireJS and angularJS

I am studying a code from a former employee of the company and he used requireJS + angularJS. It created several modules with enough services etc, however, my question is: when using a service or a directive, does the require and the angular loa...
asked by 16.06.2015 / 14:56