相关疑难解决方法(0)

CUSTOM_ELEMENTS_SCHEMA添加到NgModule.schemas仍然显示错误

我刚从Angular 2 rc4升级到rc6并且遇到了麻烦.

我在控制台上看到以下错误:

Unhandled Promise rejection: Template parse errors:
'cl-header' is not a known element:
1. If 'cl-header' is an Angular component, then verify that it is part of this module.
2. If 'cl-header' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schema' of this component to suppress this message. ("<main>
    [ERROR ->]<cl-header>Loading Header...</cl-header>
    <div class="container-fluid">
      <cl-feedbackcontai"): AppComponent@1:4
Run Code Online (Sandbox Code Playgroud)

这是我的标题组件:

import { Component } from '@angular/core';
import { Router } from '@angular/router';

// own service
import { AuthenticationService } …
Run Code Online (Sandbox Code Playgroud)

karma-jasmine angular

119
推荐指数
9
解决办法
19万
查看次数

标签 统计

angular ×1

karma-jasmine ×1