MCPcopy Index your code
hub / github.com/angular/angular / constructor

Method constructor

packages/core/test/render3/view_fixture.ts:67–181  ·  view source on GitHub ↗
({
    create,
    update,
    decls,
    vars,
    consts,
    context,
    directives,
    sanitizer,
  }: {
    create?: () => void;
    update?: () => void;
    decls?: number;
    vars?: number;
    consts?: TConstants;
    context?: {};
    directives?: any[];
    sanitizer?: Sanitizer;
  } = {})

Source from the content-addressed store, hash-verified

65 lView: LView;
66
67 constructor({
68 create,
69 update,
70 decls,
71 vars,
72 consts,
73 context,
74 directives,
75 sanitizer,
76 }: {
77 create?: () => void;
78 update?: () => void;
79 decls?: number;
80 vars?: number;
81 consts?: TConstants;
82 context?: {};
83 directives?: any[];
84 sanitizer?: Sanitizer;
85 } = {}) {
86 this.context = context;
87 this.createFn = create;
88 this.updateFn = update;
89
90 const document = (((typeof global == 'object' && global) || window) as any).document;
91 const rendererFactory = getRendererFactory2(document);
92
93 const hostRenderer = rendererFactory.createRenderer(null, null);
94 this.host = hostRenderer.createElement('host-element') as HTMLElement;
95 const hostTView = createTView(
96 TViewType.Root,
97 null,
98 null,
99 1,
100 0,
101 null,
102 null,
103 null,
104 null,
105 null,
106 null,
107 );
108 const hostLView = createLView(
109 null,
110 hostTView,
111 {},
112 LViewFlags.CheckAlways | LViewFlags.IsRoot,
113 null,
114 null,
115 {
116 rendererFactory,
117 sanitizer: sanitizer || null,
118 changeDetectionScheduler: null,
119 ngReflect: false,
120 tracingService: null,
121 },
122 hostRenderer,
123 null,
124 null,

Callers

nothing calls this directly

Calls 10

getRendererFactory2Function · 0.90
createTViewFunction · 0.90
createLViewFunction · 0.90
extractDirectiveDefFunction · 0.90
createTNodeFunction · 0.90
renderViewFunction · 0.90
toDefsFunction · 0.85
createRendererMethod · 0.65
createElementMethod · 0.65
createFunction · 0.50

Tested by

no test coverage detected