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

Function createNgModule

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

Source from the content-addressed store, hash-verified

694 }
695
696 function createNgModule(Comp: any) {
697 class Module {
698 static ɵmod = defineNgModule({type: Module});
699 static ɵinj = defineInjector({});
700 }
701 setClassMetadata(
702 Module,
703 [
704 {
705 type: NgModule,
706 args: [
707 {
708 declarations: [Comp],
709 schemas: [NO_ERRORS_SCHEMA],
710 },
711 ],
712 },
713 ],
714 null,
715 null,
716 );
717 return Module;
718 }
719
720 it('should not log unknown element warning for AOT-compiled components', () => {
721 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