我正试图完成一个从“从理论到实践的角度”的练习--亚辛·侯赛因( Asim )
作为对我自己的挑战,我正试图向前迈进一步,使用角CLI重构应用程序,而不是在同一个文件中编写所有组件;请参阅书中的示例,但该应用程序正在崩溃。到目前为止,我已经创建了两个新组件
// JokeComponent
import { Component, NgModule, OnInit, Input } from '@angular/core';
class Joke {
public setup: string;
public punchline: string;
public hi
我试着构建一个离子2应用程序。当我在浏览器中使用离子型服务或在模拟器上启动应用程序时,一切都很好。
但是当我每次尝试构建错误时
ionic-app-script tast: "build"
Error Type AddEvent in "PATH"/add.event.ts is part of the declarations of 2 modules: AppModule in "PATH"/app.modules.ts and AddEvent in "PATH"/add-event.module.ts.
Please co
我试图在一个使用<mat-form-field>的角度项目中使用Material2,但我碰到了一堵墙。
获取下面的错误消息。
Uncaught Error: Template parse errors:
'mat-form-field' is not a known element:
1. If 'mat-form-field' is an Angular component, then verify that it is part of this module.
2. If 'mat-form-field' is a Web Com
我的想法已经用完了。我想在角度库的一个组件中使用(ngModel)输入,所以我需要在库的模块中导入FormsModule才能使用它。我做到了。我有一个演示项目,我调用这个库的一个组件来测试它,但是我得到了标题中的错误。有人知道怎么做吗?
我还尝试在演示角项目中的一个组件中导入FormsModule中的app.module,它可以工作。但是,在图书馆的组成部分中实现这一点是不可能的。
错误:
core.js:6162 ERROR Error: NG0201: No provider for NgControl found in NodeInjector. Find more at https:/
我正在尝试实现产品组件的延迟加载。组件按预期延迟加载,但当我将NavBarComponent模板作为产品模板的子组件时,会得到以下错误:
core.js:1448 ERROR Error: Uncaught (in promise): Error: Template parse
errors:
'app-navbar' is not a known element:
1. If 'app-navbar' is an Angular component, then verify that it is part of
this module.
2. If
所以我在我的项目中有一个共享模块,其中包括我所有的角度材料模块。我的代码构建并运行得很好。问题是,在我的html文件中,在vs代码中,我在每个角材料组件标签下都有红色的线条,有一个错误:
'mat-select' is not a known element:
1. If 'mat-select' is an Angular component, then verify that it is part of this module.
2. If 'mat-select' is a Web Component then add 'CUSTO
我已经创建了一个共享组件,我想要在几乎所有其他组件中使用它,我在以下位置收到此错误: Type BreadcrumbComponent is part of the declarations of 2 modules: BreadcrumbModule and CardsModule! 这是我的breadcrumb.module.ts: import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { BreadcrumbComp