I am currently working on upgrading a small Angular2 project, which is based on the Angular2 Seed project, to Angular2 RC5.
Within my project, I have various features, one of them being referred to as home
. The Home component utilizes a child component named create-report-card-form
. I have initialized both the home and create-report-card-form
components within the home.module
file (see code snippet below) and encountered the following error:
Unhandled Promise rejection: Template parse errors: Can't bind to 'currentReportCardCount' since it isn't a known property of 'create-report-card-form'.
- If 'create-report-card-form' is an Angular component and it has 'currentReportCardCount' input, then verify that it is part of this module.
Project structure:
-app
- app.module.ts
- app.component.ts
- +home
- home.module.ts
- home.component.ts
- home.component.html
- create-report-card-form.component.ts
- create-report-card-form.component.html
- +<other "features">
- shared
- shared.module.ts
home.module:
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {ReactiveFormsModule} from '@angular/forms';
import { SharedModule } from '../shared/shared.module';
import { DataService } from '../shared/services/index';
import { HomeComponent } from './home.component';
import { CreateReportCardFormComponent } from './create-report-card-form.component';
@NgModule({
imports: [CommonModule, SharedModule, ReactiveFormsModule],
declarations: [HomeComponent, CreateReportCardFormComponent],
exports: [HomeComponent, CreateReportCardFormComponent],
providers: [DataService]
})
export class HomeModule { }
create-report-card-form.component.ts
create-report-card-form.component.html
home.component.ts
home.component.html