Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法导入';多选下拉菜单';Angular2应用程序中的程序包_Angular - Fatal编程技术网

无法导入';多选下拉菜单';Angular2应用程序中的程序包

无法导入';多选下拉菜单';Angular2应用程序中的程序包,angular,Angular,我在Angular2应用程序中使用multiselect下拉菜单并导入包,如下所示: import {MultiselectDropdown, IMultiSelectOption} from './multiselect-dropdown'; @Component({ directives: [MultiselectDropdown] }); 但在运行应用程序时,我发现了一个错误: SyntaxError:意外标记: 在ZoneDelegate.invoke()处 在Zone.run()处

我在Angular2应用程序中使用multiselect下拉菜单并导入包,如下所示:

import {MultiselectDropdown, IMultiSelectOption} from './multiselect-dropdown';
@Component({
directives: [MultiselectDropdown]
});
但在运行应用程序时,我发现了一个错误:

SyntaxError:意外标记: 在ZoneDelegate.invoke()处 在Zone.run()处 在 评价 从@angular2 polyfills.js:349Zone.run@angular2 polyfills.js:242(匿名函数)@angular2 polyfills.js:597ZoneDelegate.invokeTask@angular2 polyfills.js:382Zone.runTask@angular2 polyfills.js:282drainMicroTaskQueue@angular2 polyfills.js:500ZoneTask.invoke@angular2 polyfills.js:452加载为“/multifills”时出错 content_script.js:2


我使用的软件包是:

更改您的导入声明,如下所示:

import {MultiselectDropdown, IMultiSelectOption} from 'multiselect-dropdown';

更改您的导入声明,如下所示:

import {MultiselectDropdown, IMultiSelectOption} from 'multiselect-dropdown';

从“/multiselect dropdown”导入{MultiselectDropdown,immultiselectoption};是multiselect-dropdown.ts文件及其正确的.import{MultiselectDropdown,immultiselectoption}from./MultiselectDropdown'的路径;multiselect-dropdown.ts文件的路径及其正确性。