This is EmployeeCountComponent it is declared in AppMpdule Declaration Array successfully and i am using this as a nested component in Employee-listComponent I wanted to pass the Employee-listComponent data to the three properties declared in the EmployeeCountComponent i.e from Employee-listComponent to EmployeeCountComponent for that I have added Input decorators to EmployeeCount Class as it is getting input data from Employee-listComponent
but i am encountering the following error
The class 'EmployeeCountComponent' is listed in the declarations of the NgModule 'AppModule', but is not a directive, a component, or a pipe. Either remove it from the NgModule's declarations, or add an appropriate Angular decorator
EmployeeCountComponent
~~~~~~~~~~~~~~~~~~~~~~
src/app/employee-count/employee-count.component.ts:10:14
10 export class EmployeeCountComponent implements OnInit
{
~~~~~~~~~~~~~~~~~~~~~~
'EmployeeCountComponent' is declared here.
Error: src/app/employee-count/employee-count.component.ts:21:15 - error NG2003: No suitable injection token for parameter 'all' of class 'EmployeeCountComponent'. Consider using the @Inject decorator to specify an injection token.
21 constructor(all:number, male:number, female:number) { ~~~
src/app/employee-count/employee-count.component.ts:21:19 21 constructor(all:number, male:number, female:number) { ~~~~~~ This type is not supported as injection token.
1.EmployeeCountComponent
2. EmployeeeListComponent EmployeeeListComponent