假设拥有此home.component.html
页:
other component
<app-modal [display]="displayModal"></app-modal>
现在在my home.component.ts
中,我像实例变量一样放置:
@Output() displayModal='none';
以我的app.module.ts
做:
declarations: [
...
HomeComponent,
ModalComponent
....
],
在我的app-modal.component.ts
中,我在实例变量中使用:
@Input() display;
但是它给了我
Can't bind to 'display' since it isn't a known property of 'app-modal'.
有人可以帮助我吗?