我想知道是否可以将 mat 表格行放置在与表格组件不同的另一个组件中,这是一个示例:
<mat-table #table [dataSource]="dataSource" class="table" matSort>
<user-table-row> </user-table-row>
<ng-container matColumnDef="profile">
<mat-header-cell *matHeaderCellDef mat-sort-header class="header-cell"> Profile Type </mat-header-cell>
<mat-cell *matCellDef="let user" class="cell"> {{user.profile.type}} </mat-cell>
</ng-container>
<ng-container matColumnDef="status">
<mat-header-cell *matHeaderCellDef mat-sort-header class="header-cell"> Status </mat-header-cell>
<mat-cell *matCellDef="let user" class="cell"> {{user.profile.status}} </mat-cell>
</ng-container>
<!-- Header and Row Declarations -->
<mat-header-row *matHeaderRowDef="['createdAt', 'email', 'profile', 'status', 'isApproved', 'actions']" class="header-row"></mat-header-row>
<mat-row *matRowDef="let row; columns: ['createdAt', 'email', 'profile', 'status', 'isApproved', 'actions']" class="row"></mat-row>
</mat-table>
Run Code Online (Sandbox Code Playgroud)
我如何制作这样的东西:
<mat-table #table [dataSource]="dataSource" class="table" matSort>
<user-table-row> </user-table-row>
</mat-table>
Run Code Online (Sandbox Code Playgroud)
可能吗,有人以前做过吗?
我需要从此字符串中提取日期:
BB通知:在04/10的11:28购买您的壁虱,最终卡号xxxx,$ 00,00。如果您不认识,请致电40032 2412。
也是整个日期2015年4月10日
日期格式为dd / MM或dd / MM / yyyy
代码:
String mydata =“ BB告知:在04/10的11:28,购买您的tickect,最终卡号xxxx,$ 00,00。如果您不认识电话400322412。”
Pattern p = Pattern.compile("(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\\d\\d");
Matcher m = p.matcher(mydata);
Run Code Online (Sandbox Code Playgroud)
结果:m.matches()== false