1

我有这个require.config设置:

require.config({
    paths: {
        angular: '../common/vendor/angular/angular'
    },

    shim: {
        angular: {
            exports: 'angular'
        }
    }
});

require(['angular'], function (ng) {


});

加载脚本时,它会引发以下错误:

脚本错误

有谁知道这是什么?阻碍angular加载。

这就是我加载脚本的方式:

<script src="common/vendor/requirejs/require.js" data-main="app/main.js"></script>

编辑:似乎添加了这个:

require(['angular'], function (ng) {
    ng.bootstrap(document.documentElement);
});

正确加载角度。虽然仍然抛出错误。

4

1 回答 1

1

The error message is from the JSONView extension. Turn off the extension will eliminate the error. But that's not a error at all. It has nothing to do with the real app/script.

于 2014-09-05T07:04:29.667 回答