Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
274 views
in Technique[技术] by (71.8m points)

angular - NG2 duplicate module name

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'.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can give an alias in typescript import. Try

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...