MCPcopy
hub / github.com/angular/angular / createNgModule

Function createNgModule

packages/core/test/acceptance/ng_module_spec.ts:708–730  ·  view source on GitHub ↗
(Comp: any)

Source from the content-addressed store, hash-verified

706 }
707
708 function createNgModule(Comp: any) {
709 class Module {
710 static ɵmod = defineNgModule({type: Module});
711 static ɵinj = defineInjector({});
712 }
713 setClassMetadata(
714 Module,
715 [
716 {
717 type: NgModule,
718 args: [
719 {
720 declarations: [Comp],
721 schemas: [NO_ERRORS_SCHEMA],
722 },
723 ],
724 },
725 ],
726 null,
727 null,
728 );
729 return Module;
730 }
731
732 it('should not log unknown element warning for AOT-compiled components', () => {
733 const spy = spyOn(console, 'warn');

Callers 2

ng_module_spec.tsFile · 0.90
di_spec.tsFile · 0.90

Calls 1

setClassMetadataFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…