Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/28.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
重复标识符';ModalModule';在ng2模式和angular2模式中_Angular - Fatal编程技术网

重复标识符';ModalModule';在ng2模式和angular2模式中

重复标识符';ModalModule';在ng2模式和angular2模式中,angular,Angular,对一些人来说,这可能是一个简单的问题,但对我来说似乎是一个大问题。 我使用ng2模式在angular2应用程序中显示一些模式对话框。我想使用angular2模式显示另一系列弹出窗口。但是当我在公共shared.module.ts文件中同时从两个包中使用import{ModalModule}时,它会对重复的模块抛出错误。如何在其中任何一个模块中重命名ModalModule?否则,我如何避免这个错误 import { ModalModule } from 'ng2-modal'; import {

对一些人来说,这可能是一个简单的问题,但对我来说似乎是一个大问题。 我使用ng2模式在angular2应用程序中显示一些模式对话框。我想使用angular2模式显示另一系列弹出窗口。但是当我在公共
shared.module.ts
文件中同时从两个包中使用
import{ModalModule}
时,它会对重复的模块抛出错误。如何在其中任何一个模块中重命名ModalModule?否则,我如何避免这个错误

import { ModalModule } from 'ng2-modal';
import { ModalModule } from 'angular2-modal';

我想我们可以给第二个导入类一个别名

import { ModalModule } from 'ng2-modal';
import { ModalModule as SecondModal } from 'angular2-modal';
这太酷了。

可能是