抱歉这个基本问题。我是 Angular 项目的新手。
我想将组件 @ncstate/sat-popover 与 Angular 材料表一起使用。目的是对表格行中的字段进行内联编辑。我从 stackblitz 的这个例子中获得灵感。 https://stackblitz.com/edit/inline-edit-mat-table?file=app%2Fapp.component.html
我使用它的方式示例:
<mat-cell *matCellDef="let row" [satPopoverAnchorFor]="p" (click)="p.open()">
<ng-container *ngIf="row.consumption_id">
{{row.consumption_id}}
</ng-container>
<span class="add-consumption_id" *ngIf="!row.consumption_id">
Add a consumption id.
</span>
<sat-popover #p
hasBackdrop
xAlign="start"
yAlign="start"
(closed)="update(row, $event)">
<inline-edit [value]="row.consumption_id"></inline-edit>
</sat-popover>
</mat-cell>
Run Code Online (Sandbox Code Playgroud)
我收到错误:
SCRIPT5022: Template parse errors:
**Can't bind to 'satPopoverAnchorFor' since it isn't a known property of 'mat-cell'.**
1. If 'mat-cell' is an Angular component and it has 'satPopoverAnchorFor' input, then verify that it is part of this module.
...
Run Code Online (Sandbox Code Playgroud)
我用不同版本的 …