Answers for "karma error parent child"

0

karma error parent child

import { ChildComponent } from 'childComponent';

...
let component: ThisComponet;
let childComponent: ChildComponent;
.....
declarations: [ChildComponent],
.....
component = fixture.componentInstance;
// to get a handle on the child component, you can select it By.directive
childComponent = fixture.debugElement.query(By.directive(ChildComponent)).componentInstance; 
// should have access to your childComponent public properties and methods now
Posted by: Guest on November-28-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language