我正在用有角度的材料做一个仪表盘。在该仪表板上,我希望为每台服务器显示一张卡片(到目前为止还好),并在该卡片中显示一个表,其中包含该特定服务器上的客户。那就是我被困住的地方。
当使用下面的代码时,我得到以下错误(针对每个表):
ERROR Error: Could not find column with id "name".
我的相关代码:
<mat-card class="card" *ngFor="let listItem of serverList; let i = index">
<mat-card-header&
我用卡片在角度2材料网格列表中遇到问题。
我想在网格列表中显示卡片,但它没有响应
Here is the code:
<md-grid-list cols="4">
<md-grid-tile *ngFor="let card of cards">
<md-card>
<img md-card-image src="{{card.image}}">
<md-card-content>
{{card.content}}
&l
我有角度材料的经典卡片,就像下一个模板 <mat-card class="example-card">
<mat-card-header>
<mat-card-title>Shiba Inu</mat-card-title>
</mat-card-header>
<mat-card-content>
<p>The Shiba Inu is the smallest of the six original and distinct spitz breeds of do
我有一个角度的材料组件,我试图用新的数据动态更新。
@ViewChild('tree') tree: MatTree<any>;
...
treeControl: NestedTreeControl<any>;
dataSource: MatTreeNestedDataSource<any>;
...
// This does not work
this.tree.renderNodeChanges(newData);
我可以很好地更改数据源数据,并将其反映在日志中,但树永远不会重新呈现this.dataSource.data = newDa
我刚刚收到一个离开我们公司的同事发来的web应用程序项目。该项目是使用Angular2作为其框架构建的,但是该工作人员似乎试图将AngularJS材料用于HTML组件。
据我所知,如果我想在AngularJS材料中使用卡片组件,我将使用标记<md-card>,而对于Angular2材料,我将使用标记<mat-card>。在这个项目中,100%使用的组件都是'md‘组件,这对于Angular2项目来说是没有意义的。
当我为项目提供服务时,什么都没有出现,并且我得到了错误:'md-card' is not a known element.If
我有下面的angular2材料表
<mat-table #table [dataSource]="dataSource" >
<!--- Note that these columns can be defined in any order.
The actual rendered columns are set as a property on the row definition" -->
<!-- Position Column -->
<ng
我使用一个角度材料数据表来显示可以添加到的对象列表。当将对象添加到数据源时,页面索引会中断并显示为负值。解决这个问题的唯一方法是将材料分页器的页面索引重置为0。但是,对分页器的任何进一步更改都会导致pageIndex为-1或分页器损坏。下面是一个示例:
我首先在角材料数据源中设置了新的数据,如下所示:
private refreshTable() {
// first we update the length of the paginator with the new length of the datasource data to ensure parity
this.pag