2

我目前正在使用 Angular 2(或 Angular 4)在 jasmine/karma 中运行一些测试。问题是我还在使用尚不完全支持 angular 4 的材料设计,这使得无法测试组件,因为它总是会抛出以下错误:

The <template> element is deprecated. Use <ng-template> instead

("[WARNING ->]<template><div class="mat-autocomplete-panel" 
role="listbox" [id]="id" [ngClass]="_getClassList()" #p")

我不能停止使用“模板”,因为在我看来,我没有使用它,它被 Material Design 在较低级别上使用。

所以我的问题是:

有没有办法忽略或抑制警告?(在构建应用程序时看到代码运行良好)

编辑:Md2 似乎已经解决了这个问题:https ://github.com/Promact/md2/issues/125 (我不能保证这一点)

4

0 回答 0