I processed all amd modules with grunt-contrib-requirejs
and got the same number of min.js files as before, and then require-concat
all these files.
Then I tried to directly load the file after requirejs.config()
concat without using . I found that it didn’t work. The angular module was not loaded in the browser’s Network, so I changed the original requirejs.config()
(below) to After adding it again, I found that the angular module was still not loaded in the Network
requirejs.config({
baseUrl:'scripts',
paths:{
"angular":"//cdn.bootcss.com/angular.js/1.3.14/angular.min",
"angular-touch":"//cdn.bootcss.com/angular.js/1.3.14/angular-touch.min",
},
shim:{
'angular': {
exports: 'angular'
},
'angular-touch': {
deps:['angular'],
exports: 'angular-touch'
}
}
});
How should this situation be handled so that the original dependencies of the program are loaded correctly and the app can run normally?
Check whether the path configuration is correct.