NG2 duplicate module name

一世执手 提交于 2019-12-25 09:16:30

问题


Using ng2 calendar module from PrimeNG (link) and open source calendar.

import {CalendarModule} from "primeng/components/calendar/calendar"; import {CalendarModule} from 'angular-calendar';

How can I import both modules into mine?

Now TS says Duplicate identifier 'CalendarModule'.


回答1:


You can give an alias in typescript import. Try

import { CalendarModule as c }  from "primeng/components/calendar/calendar";


来源:https://stackoverflow.com/questions/41393856/ng2-duplicate-module-name

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!