私はインターフェースを持っています:
export interface IEvent {
name: string;
city: string;
startDate: Date;
endDate: Date;
}
クラスで使用するもの:
import {IEvent} from '../../interfaces/IEvent';
export class Event implements OnInit {
@Input() data: IEvent;
AoT でコンパイルすると、次のエラーが発生します。
Module src/interfaces/IEvent.ts does not export IEvent (imported by src/components/Event/Event.ts)
に変更する@Inputと@Input() data;問題ありません。
@InputAoT を使用するときに型を定義する方法を知っている人はいますか?
https://forum.ionicframework.com/t/interface-does-not-export-bundle-dev-failed/66225も参照してください