MCPcopy Create free account
hub / github.com/angular/angular / AppComponent

Class AppComponent

packages/core/test/acceptance/component_spec.ts:948–957  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

946
947 it('should throw if required query is read in the constructor', () => {
948 @Component({
949 template: `<div #el></div>`,
950 })
951 class AppComponent {
952 divEl = viewChild.required<ElementRef<HTMLDivElement>>('el');
953
954 constructor() {
955 this.divEl();
956 }
957 }
958
959 // non-required query results are undefined before we run creation mode on the view queries
960 expect(() => {

Callers

nothing calls this directly

Calls 2

ComponentInterface · 0.90
requiredMethod · 0.45

Tested by

no test coverage detected