小编Dav*_*Cyr的帖子

How to add a checkbox in a Material Design table in Angular 4

I would like to add a checkbox in a Material Design table in Angular 4, it would be under the column Publish. The problem is that the checkbox doesn't show in the table just the text with and error message

"No value accessor for form control with unspecified name attribute"

Here is my code:

<div class="mat-table-container mat-elevation-z8">
  <mat-table #table [dataSource]="assessmentManualList">

    <ng-container cdkColumnDef="documentID">
      <mat-header-cell *cdkHeaderCellDef>  </mat-header-cell>
      <mat-cell *cdkCellDef="let row">
        <button mat-icon-button [matMenuTriggerFor]="menu">
          <mat-icon>more_vert</mat-icon>
        </button>
        <mat-menu #menu="matMenu">
          <button mat-menu-item>
            <mat-icon><i class="material-icons">content_copy</i></mat-icon>
            <span>Copy …
Run Code Online (Sandbox Code Playgroud)

checkbox material-design angular-material2 angular

6
推荐指数
1
解决办法
2万
查看次数

Angular 4 403 Forbidden on route parameter with IIS

我使用 IIS 版本 6.1 SP1 将我的 Angular 项目部署到我们的开发环境,并且我的路由参数出现 403 Forbidden 错误。在我的 URL 中,“客户端”不是组件而是路由参数。该项目在我的本地主机上运行良好,只有当我将代码推送到我们的开发环境时才会出现问题。

在此处输入图片说明 这是我在 app.routes.ts 中的代码:

const routes: Routes = [
   {
       path: '',
       redirectTo: 'login',
    pathMatch: 'full'
},
{
    path: 'login',
    component: LoginComponent
},
{
    path: 'login/:licenseeCode',
    component: LoginComponent

},
...
Run Code Online (Sandbox Code Playgroud)

iis-6 angular-ui-router angular

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