0

为什么 jhipster 在源文件中有这些重复的依赖项列表,即使它使用 ngmin 自动添加注入的依赖项作为构建任务的一部分,所以它对缩小是安全的?

比如services.js中有这段代码,

jhipsterApp.factory('Register', ['$resource',
    function ($resource) {
        return $resource('app/rest/register', {}, {
        });
    }]);

但由于它使用 ngmin,我会期待这样的东西,没有数组和额外的“$resource”

jhipsterApp.factory('Register', function ($resource) {
        return $resource('app/rest/register', {}, {
        });
    });

难道只是ngmin引入之前的代码是这样的,还没有简化吗?也许我没有正确理解它。

4

0 回答 0