如何使用特定列过滤材料数据表?
public dataSource;
this.dataSource = new MatTableDataSource(this.items);
this.dataSource.filterPredicate = function customFilter(data , filter:string ): boolean {
return (data.name.startsWith(filter));
}
applyFilter(filterValue: string) {
filterValue = filterValue.trim(); // Remove whitespace
filterValue = filterValue.toLowerCase(); // MatTableDataSource defaults to lowercase matches
this.dataSource.filter = filterValue;
}
Run Code Online (Sandbox Code Playgroud)
当我键入返回时,上面的代码不起作用,因为没有数据匹配.
我按照官方安装指南安装了kong。现在开始我应该给kong.conf文件?我找不到它在哪里。
kong start [-c /path/to/kong.conf]
如何在.html文件中使用routerLink ?我使用下面的代码,但它不起作用.
<div class="container">
<header class="page-header">
<ul class="nav nav-pills">
<li routerLinkActive="active">
<a [routerLink]="['/register']">Register<`/a>
</li>
<li routerLinkActive="active">
<a [routerLink]="['/login']">Login</a>
</li>
</ul>
</header>
<p class="jumbotron">
<router-outlet><router-outlet>
</p>
Run Code Online (Sandbox Code Playgroud)
在app.component.ts我提到过templateUrl: 'index.html'.