Angular 5 Karma测试报错:'app-addbook'不是已知元素
Got it, let's organize your Angular book component setup clearly with proper formatting:
Angular Book Component Setup
File Structure
Here's the full list of files you have under /src/app/book/:
book.component.tsbook.module.tsbook.component.htmlbook-routing.module.tsaddbook.component.htmladdbook.component.ts
book.component.html Code
<button class="btn btn-outline-success" (click)="addButton()">Add Book</button> <div *ngIf="toggleFlag"> <app-addbook></app-addbook> </div>
Partial book.module.ts Code
Looks like you shared a snippet of this file, here's the formatted version:
@NgModule({ imports: [ CommonModule, ReactiveFormsModule, Book...
内容的提问来源于stack exchange,提问作者Niladri Banerjee - Uttarpara
相关产品推荐
相关产品推荐

