MCPcopy Create free account
hub / github.com/angular/components / constructor

Method constructor

src/material/menu/menu.spec.ts:1511–1518  ·  view source on GitHub ↗
(ctor: {new (): T}, inputs: {[key: string]: any} = {})

Source from the content-addressed store, hash-verified

1509 readonly trigger!: HTMLElement;
1510
1511 constructor(ctor: {new (): T}, inputs: {[key: string]: any} = {}) {
1512 this.fixture = TestBed.createComponent(ctor);
1513 Object.keys(inputs).forEach(
1514 key => ((this.fixture.componentInstance as any)[key] = inputs[key]),
1515 );
1516 this.fixture.detectChanges();
1517 this.trigger = this.fixture.componentInstance.triggerEl.nativeElement;
1518 }
1519
1520 openMenu() {
1521 this.fixture.componentInstance.trigger.openMenu();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected