angular.js - The amd module processed by grunt is not loaded in angular. How to solve it?
淡淡烟草味
淡淡烟草味 2017-05-15 16:55:54
0
1
727

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?

淡淡烟草味
淡淡烟草味

reply all(1)
给我你的怀抱

Check whether the path configuration is correct.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template