2016-10-08 21 views
0

アンカータグを無効にするために角度2 ngClassを使用しています。これはgoogle chromeでは機能していますが、IE 11では機能しません。角度2 ng-classがIE 11で機能していません

<div id ="fileList" class="panel-body collapse in"> 
      <div class="table-responsive"> 
        <table id="uploadInvoice" class="table table-bordered table-condensed"> 
        <thead class ="thead"> 
        <tr> 
         <th class="gridHeader sortable order1" style="display:none;">File ID</th> 
         <th class="gridHeader sortable">File Name</th> 
         <th class="gridHeader sortable">Upload Status</th> 
         <th class="gridHeader sortable">Uploaded Date</th> 
         <th class="gridHeader sortable">Updated Date</th> 
         <th class="gridHeader sortable">Uploaded BY</th> 
        </tr> 
        </thead> 
        <tbody> 
        <tr *ngFor="let file of fileList"> 
         <td style="display:none;">{{file.id}}</td> 
         <td><a href="#fileList" data-toggle="collapse" [ngClass]="{'disabled':file.fileStatus == 'VALIDATING'}" 
         (click) ="getValidationSummary(file.id,file.fileName)">{{file.fileName}}</a></td> 
         <td>{{file.fileStatus}}</td> 
         <td>{{file.createdDate}}</td> 
         <td>{{file.modifiedDate}}</td> 
         <td>{{file.createdBy}}</td>          
        </tr> 
        </tbody> 
       </table> 

       </div> 
      </div> 
     </div> 
+0

私はちょうど同様の状況に遭遇しました。これを解決する運がありましたか? – atsituab

+0

これを解決するには2通りの方法があります。 uisng * NgIfまたは[disabled]を使用する – Developer

答えて

1

ngClassの代わりに* ngIfを使用して解決しました。

<div id="fileList" class="panel-body collapse in"> 
          <div class="table-responsive"> 
           <table id="uploadInvoice" 
            class="table table-bordered table-condensed"> 
            <thead class="thead"> 
             <tr> 
              <th class="gridHeader sortable order1" style="display: none;">File 
               ID</th> 
              <th class="gridHeader sortable">File Name</th> 
              <th class="gridHeader sortable">Upload Status</th> 
              <th class="gridHeader sortable">Uploaded Date</th> 
              <th class="gridHeader sortable">Updated Date</th> 
              <th class="gridHeader sortable">Uploaded BY</th> 
              <th class="gridHeader sortable ">Comments</th> 
             </tr> 
            </thead> 
            <tbody> 
             <tr *ngFor="let file of fileList"> 
              <td style="display: none;">{{file.id}}</td> 
              <td 
               *ngIf="(file.fileStatus != 'PROCESSED' && file.fileStatus != 'ERRORED')">{{file.fileName}}</td> 
              <td 
               *ngIf="(file.fileStatus == 'PROCESSED' || file.fileStatus == 'ERRORED' )"><a 
               href="#fileList" data-toggle="collapse" 
               (click)="getValidationSummary(file.id,file.fileName)">{{file.fileName}}</a></td> 
              <td>{{file.fileStatus}}</td> 
              <td>{{file.createdDate}}</td> 
              <td>{{file.modifiedDate}}</td> 
              <td>{{file.createdBy}}</td> 
              <td><span class="wrappingData">{{ file.comments }}</span></td> 
             </tr> 
            </tbody> 
           </table> 

          </div> 
         </div> 
関連する問題