MCPcopy
hub / github.com/rx-angular/rx-angular / get

Function get

libs/cdk/template/src/lib/utils.ts:63–71  ·  view source on GitHub ↗
(name: N)

Source from the content-addressed store, hash-verified

61 return templateCache.get(name) || of(undefined);
62 };
63 const get = (name: N): TemplateRef<C> | undefined => {
64 let ref: TemplateRef<C>;
65 const templatRef$ = get$(name);
66 if (templatRef$) {
67 const sub = templatRef$.subscribe((r) => (ref = r));
68 sub.unsubscribe();
69 }
70 return ref;
71 };
72
73 return {
74 add(name: N, templateRef: TemplateRef<C>): void {

Callers 3

templateHandlingFunction · 0.70
getLatestNodeVersionFunction · 0.50
getLatestNodeVersionFunction · 0.50

Calls 2

get$Function · 0.85
subscribeMethod · 0.80

Tested by

no test coverage detected