2

我正在尝试使用 Require.js 以及 Angular js 和 Jquery 加载谷歌可视化(图表)

我参考了很多帖子,从这里我看到我们可以使用https://github.com/millermedeiros/requirejs-plugins/blob/master/src/goog.js插件

这是我的代码。但这不起作用,它没有加载任何后续脚本。

require.config({    
    paths: {
    async: 'lib/async',
        goog: 'lib/goog',
        propertyParser : 'lib/propertyParser',
    jquery: 'lib/jquery.min',
    'jquery.ui.widget': 'lib/jquery.ui.widget',
        jqfileupload: 'lib/jquery.fileupload',
    jqfileuploadiframe: 'lib/jquery.iframe-transport',
    angular:'lib/angular.min',
    ngUi:'lib/angular-ui.min',
    ngResource:'lib/angular-resource.min',
    ngCookies:'lib/angular-cookies.min',
    bootstrap:'lib/bootstrap.min'
    },
    shim: { 
    'angular' : {exports:'angular',deps:['jquery']},
    'ngResource' : {exports:'ngResource',deps:['angular']},
    'ngUi' : {exports:'ngUi',deps:['angular']},
    'ngCookies' : {exports:'ngCookies',deps:['angular']},
    'jquery.ui.widget' : ['jquery'],
    'jqfileupload' : ['jquery','jqfileuploadiframe','jquery.ui.widget'],    
    'bootstrap' : ['jquery'],   
    }
});

define(['angular','jquery','ngResource','ngCookies','ngUi','bootstrap','jqfileupload','goog!visualization,1,packages:[corechart]'],function(){

var app = angular.module("myApp",[]);

});

它给了我错误

Error: No module: myApp

如果我删除'goog!visualization,1,packages:[corechart]'条目,一切正常

请提前帮助和感谢

4

0 回答 0