Angular ngx完美滚动条不工作

Angular ngx完美滚动条不工作,angular,Angular,我想在我的项目中包括perfect scrollbar,所以我安装了它并将其包括在我的项目中,如下所示 但运行项目时会显示此错误: 应用程序模块 import { PerfectScrollbarConfigInterface } from 'ngx-perfect-scrollbar'; import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar'; const PERFECT_SCROLLBAR_CONFIG: Perf

我想在我的项目中包括
perfect scrollbar
,所以我安装了它并将其包括在我的项目中,如下所示

但运行项目时会显示此错误:

应用程序模块

import { PerfectScrollbarConfigInterface } from 'ngx-perfect-scrollbar';
    import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
const PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
suppressScrollX: true
};
@NgModule({
imports: [
PerfectScrollbarModule.forRoot(PERFECT_SCROLLBAR_CONFIG)
]
但我总是犯这个错误

SyntaxError:意外标记< 评估时() 在SystemJSLoader.\uuuuExec() 在entry.execute


我不得不加上这句话:

'ngx-perfect-scrollbar': 'npm:ngx-perfect-scrollbar/bundles/ngx-perfect-scrollbar.umd.js'

为了
systemjs.config.js

我必须添加这一行:

'ngx-perfect-scrollbar': 'npm:ngx-perfect-scrollbar/bundles/ngx-perfect-scrollbar.umd.js'

systemjs.config.js

请将此行添加到systemjs.config.js`和'systemjs.debug.config.js'

'ngx perfect scrollbar':'npm:ngx perfect scrollbar/bundles/ngx perfect scrollbar.umd.js'

例如:

(function(global){
System.config({
    paths: {
        'npm:' : 'node_modules/'
    },
    map: {
        app: 'app',
        ........
        ........

        'ngx-perfect-scrollbar': 'npm:ngx-perfect-scrollbar/bundles/ngx-perfect-scrollbar.umd.js'
    },
    packages: {
        ........
        ........

    }
});
})(this);

将此行添加到systemjs.config.js`和'systemjs.debug.config.js'

'ngx perfect scrollbar':'npm:ngx perfect scrollbar/bundles/ngx perfect scrollbar.umd.js'

例如:

(function(global){
System.config({
    paths: {
        'npm:' : 'node_modules/'
    },
    map: {
        app: 'app',
        ........
        ........

        'ngx-perfect-scrollbar': 'npm:ngx-perfect-scrollbar/bundles/ngx-perfect-scrollbar.umd.js'
    },
    packages: {
        ........
        ........

    }
});
})(this);