我在这里报告一个问题,希望一些虔诚的灵魂能帮上忙。问题是,Node给了我一个错误:
src/app/app.module.ts中的错误(11,10):ERROR TS2305:模块TS2305没有导出成员‘Cal宪兵组件’。src/app/components/calendar/calendar.component.ts(27,3):error TS2390:缺少构造函数实现。src/app/components/oculus/oculus.component.ts(2,34):error TS2307:无法找到模块“组件/日历/日历组件”。src/app/components/top-menu/top-menu.component.ts(2,10):error TS2305:模块'"V:/Projects/Kompany/source/kompany-war/src/main/websrc/test2/test-kompany/src/app/components/calendar/calendar.component"‘没有导出成员'CalendarComponent’。
这是地点..。
我在应用模块上有这个..。
`import { BrowserModule } from '@angular/platform-browser';`
`import { NgModule } from '@angular/core';`
`import { CalendarModule, DateAdapter } from 'angular-calendar';`
`import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';`
import { CalendarComponent } from'./components/calendar/calendar.component';我想要做的是把一个日历库放到我的网站上。
错误发生在我创建的组件(日历组件)上,我将我在网上找到的所有信息都放在上面,以便尝试它。
https://mattlewis92.github.io/angular-calendar/docs/index.html
这是我下载图书馆的地方。
我是新的角度,所以我提供了所有的信息,希望不要是无聊的。
到日历里是什么.
import { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';
import { CalendarEvent } from 'angular-calendar';
@Component({
selector: 'app-calendar',
changeDetection: ChangeDetectionStrategy.OnPush,
templateUrl: './calendar.component.html'
})
export class DemoComponent {
view: string = 'month';
viewDate: Date = new Date();
events: CalendarEvent[] = [
{
title: 'Click me',
start: new Date()
},
{
title: 'Or click me',
start: new Date()
}
];
constructor ()
ngOnInit() {
}
eventClicked({ event }: { event: CalendarEvent }): void {
console.log('Event clicked', event);
}
}我在网站上读到,这个错误是由于Angular的基础设施造成的。和一些类似的主题的答案,关于订购进口,但他们已经是有序的。
我真的不知道该怎么办..。希望有人能帮上忙。
满面笑容
发布于 2018-11-09 20:58:58
我看到了一些错误,所有的角度都在抱怨。
constructor (),但是如果您希望它是空的,则应该使用constructor() {}。https://stackoverflow.com/questions/53229421
复制相似问题