- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在应用程序中使用垫导航列表组件来实现选项卡和导航目的。它在前端完美运行,但在测试用例上抛出错误。
Getting the below error from karma.
There is no directive with "exportAs" set to "routerLinkActive" (" *ngFor="let tab of tabs"
[routerLink]="tab.path"
[routerLinkActive] [ERROR ->]#rla="routerLinkActive"
[active]="rla.isActive"
selectedIndex="0"
component.html
<nav mat-tab-nav-bar>
<a
mat-tab-link
*ngFor="let tab of tabs"
[routerLink]="tab.path"
[routerLinkActive] #rla="routerLinkActive"
[active]="rla.isActive"
selectedIndex="0"
>
<i class="{{tab.icon}}"></i>
{{ tab.label }}
</a>
</nav>
最佳答案
引用 Angular 4 Error: No provider for ChildrenOutletContexts in Karma-Jasmine Test线程添加了 RouterTestingModule。
解决了 karma 错误。
关于angular - 没有将 "exportAs"设置为 "routerLinkActive"的指令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47449989/
我正在尝试使用 Angular Material 进行拖放,如 Transferring items between lists 中所示. 我正在尝试与示例中显示的完全相同的代码,但在控制台中出现此错
我正在使用 Angular 4,我正在尝试添加日期选择器 datepicker-popup.html我收到如下所示的错误。我没有得到什么样的 错误 这是。请帮帮我。 datepicker-popup.
我已经包含了 FormsModule 但它显示错误。 There is no directive with “exportAs” set to “ngForm” 我的 Login.component.
我在我的 spec.ts 中从 karma/jasmin 收到此错误: There is no directive with "exportAs" set to "cdkStep" ]#step1=
我在应用程序中使用垫导航列表组件来实现选项卡和导航目的。它在前端完美运行,但在测试用例上抛出错误。 Getting the below error from karma. There is no d
我在我的 spec.ts 中从 karma/jasmin 收到此错误: There is no directive with "exportAs" set to "cdkStep" ]#step1=
我已尝试导入 FormsModule 和 NgForm 模块以及将 FormsModule 添加到导入数组。 下面是我的代码: //our root app component import { Co
当我尝试测试 LoginComponent 时出现以下错误 PhantomJS 2.1.1 (Linux 0.0.0): Executed 3 of 55 (1 FAILED) (0 secs / 0
错误 There is no directive with "exportAs" set to "matAutocomplete" ("-label="Number" matInput [formCo
我正面临这个令人沮丧的问题 There is no directive with "exportAs" set to "ngForm" (" ]#f="ngForm" (ngSubmit)="onSu
我正在使用以下代码在 angularjs 2.0 中提交表单,但出现错误,没有将导出设置为 ngForm 和 ngModel 的指令,但我正在使用。以下是我的表格: First Nam
随着 Angular Material 及其 breaking changes 的新更新, 我不能再使用我的 组件。它在我导入 MaterialModule 时工作正常,但现在在导入 MatMenuM
以下是 AngularJS 项目中的文件。正如一些帖子中所建议的,我添加了: ngModel name="currentPassword" #currentPassword="ngModel 在输入字
我在 RC4 上,我收到错误消息 There is no directive with "exportAs"set to "ngForm" 因为我的模板: Action Type
我实际上正在处理一个表单,并且正在对每个字段进行验证。但有一个问题。我的 component.html 文件 block 看起来像这样, Pacs name 这是我
我刚刚更新到 angular 9!突然间我得到了这个异常(exception):* 的模板发生错误,错误 NG8003:没有找到带有 exportAs 'ngForm' 的指令 这是模板: //A
我有以下指令: @Directive({ selector: '[changeColor]', exportAs:'changeColor' }) export class ColorDire
我已经在 stackoverflow 上看到了这个问题的答案,其中涉及如何配置应用程序。不过,我很确定我已经正确配置了它,因为应用程序运行得很好,但我的 super 简单的 Karma 测试失败了。
我正在开发一个运行良好但 Jasmine 测试抛出模板错误的应用程序。由于运行应用程序有效,模板引用变量可以绑定(bind)到 ngModel,但为什么在运行测试时它不起作用?我正在使用 "@angu
我是一名优秀的程序员,十分优秀!