.js文件中的角node_modules更改不会重新编译...?

时间:2018-09-13 10:43:31

标签: node.js angular node-modules

我试图在Angular @swimlane线形图node_modules文件夹中实现try / catch子句,这意味着我稍微更改了它们的源代码,并试图重新启动程序。但是以某种方式,这些更改不会反映在网页/程序上。我是在.js文件上执行此操作的,在node_modules模块内是否有默认隐藏为.js的隐藏.ts文件?因为我什么都没看到...或者在更改node_modules文件夹内的某些代码后是否必须重新编译或进行npm安装?

编辑:我收到this.activeEntries.slice()错误... 我更改了..\node_modules\@swimlane\ngx-charts\release\line-chart\line-chart.component.js中的代码,并围绕该函数实现了一个简单的try-catch:

LineChartComponent.prototype.deactivateAll = function () {
        try{
        this.activeEntries = this.activeEntries.slice();
        }
        catch(error) {};
        for (var _i = 0, _a = this.activeEntries; _i < _a.length; _i++) {
            var entry = _a[_i];
            this.deactivate.emit({ value: entry, entries: [] });
        }
        this.activeEntries = [];
    };

但是没有效果...还是我的尝试...以某种方式捕获错误?

0 个答案:

没有答案
相关问题