I'm trying to call a child component's function from a parent component.
As I understand, the best way to go about this is to use ViewChild.
I understand the logic of it all, but for some reason I can't import the child component into the parent component, it gives me the error:
Cannot find module '../claim-header/claim-header.component'.
This is the import section in my parent component: (Claim)
import { ClaimHeaderComponent } from '../claim-header/claim-header.component';
I've tried them all:
import { ClaimHeaderComponent } from './claim-header';
import { ClaimHeaderComponent } from './claim-header/claim-header';
import { ClaimHeaderComponent } from '../claim-header';
import { ClaimHeaderComponent } from '../../components/claim-header-component';
etc.
For reference, the rest of the imports work fine as long as they're not components:
import { ClaimDetail } from '../../modules/models/claim';
import { ClaimsService } from '../../modules/services/claims.service';
This is the declaration of my child component:
@Component({
moduleId: module.id,
selector: 'fhp-claim-header',
templateUrl: 'claim-header.component.html'
})
export class ClaimHeaderComponent implements OnInit {
...
}
And my folder layout: