Estou a implementar AngularJS + RequireJs através do AngularAMD.
Quero adicionar a biblioteca Jquery mas retorna o seguinte erro quando uso o "$":
Error: $ is not defined
Tenho o main.js configurado da seguinte forma:
require.config({
baseUrl: "js/",
// alias libraries paths
paths: {
'angular': 'libs/angular.min',
'angular-route': 'libs/angular-route.min',
'angular-ui-router': 'libs/angular-ui-router.min',
'angularAMD': 'libs/angularAMD',
'jquery': '//code.jquery.com/jquery-1.11.2.min.js',
'jquery-migrate': '//code.jquery.com/jquery-migrate-1.2.1.min.js'
},
// Add angular modules that does not support AMD out of the box, put it in a shim
shim: {
'angular-route': [ 'angular' ],
'angularAMD': [ 'angular' ],
'angular-ui-router': [ 'angular' ]
},
// kick start application
deps: ['app']
});
O que está errado?
RAIZ_DO_PROJETO/js/lib/jquery-1.11.2.js
e troca a conf parajquery: 'jquery-1.9.0'