there are two modules in my application.one is employer and second is landing.I have created a component in landing module and i want to share this component with employer module. For that i have declared this component in app.module.ts in parent module and use them in child modules.
If i use this in single module it's already working but when i share it within different modules then it's showing me error
student-rating.component.html and student-rating.component.ts
<div class="stu_profile_ratings">
<h3>Average Ratings</h3>
<!-- <rating [(ngModel)]="performance" [disabled]="false" [readonly]="true" [required]="true">
</rating> -->
<a (click)="showHideDrop();"> <img src ="../../../assets/images/drop-down-arrow-white.png" /></a>
<div *ngIf="showRatings" class="ratings_dropdown ">
<h4>Ratings given by verified employers</h4>
<ul class="marginT10">
<li>
<h5>Performance</h5>
<!-- <rating [(ngModel)]="performance" [disabled]="false" [readonly]="true" [required]="true"></rating> -->
</li>
<li>
<h5>Work Quality</h5>
<!-- <rating [(ngModel)]="work_quality" [disabled]="false" [readonly]="true" [required]="true"></rating> -->
</li>
<li>
<h5>Professionalism</h5>
<!-- <rating [(ngModel)]="professionalism" [disabled]="false" [readonly]="true" [required]="true"></rating> -->
</li>
</ul>
</div>
import { Component, OnInit ,Input, ChangeDetectorRef} from '@angular/core';
declare var $: any;
@Component({
selector: 'app-student-ratings',
templateUrl: './student-ratings.component.html',
styleUrls: ['./student-ratings.component.css']
})
export class StudentRatingsComponent implements OnInit {
showRatings : boolean = false;
@Input() performance:string;
@Input() work_quality:string;
@Input() professionalism:string;
constructor() { }
ngOnInit() { }
showHideDrop(){
this.showRatings = !this.showRatings;
}
}
landing.module.ts --->
It does not contain any of component regarding student-rating.component.ts.
These are the declarations of app.module.ts
declarations: [AppComponent, StudentRatingsComponent,Page404Component, CapitalizePipe],