小编Ped*_*des的帖子

另一个组件中的 Angular 2-4 Mat-Table 行

我想知道是否可以将 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)

可能吗,有人以前做过吗?

xmltable angular-material formattable angular

5
推荐指数
1
解决办法
2910
查看次数

Java-正则表达式从字符串中提取日期

我需要从此字符串中提取日期:

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

java regex date extract extraction

3
推荐指数
1
解决办法
3942
查看次数