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

Function constructor

packages/core/src/resource/resource.ts:124–134  ·  view source on GitHub ↗
(value: Signal<T>, debugName: string | undefined)

Source from the content-addressed store, hash-verified

122 readonly isLoading: Signal<boolean>;
123
124 constructor(value: Signal<T>, debugName: string | undefined) {
125 this.value = value as WritableSignal<T>;
126 this.value.set = this.set.bind(this);
127 this.value.update = this.update.bind(this);
128 this.value.asReadonly = signalAsReadonlyFn;
129
130 this.isLoading = computed(
131 () => this.status() === 'loading' || this.status() === 'reloading',
132 ngDevMode ? createDebugNameObject(debugName, 'isLoading') : undefined,
133 );
134 }
135
136 abstract set(value: T): void;
137

Callers

nothing calls this directly

Calls 4

computedFunction · 0.90
createDebugNameObjectFunction · 0.70
bindMethod · 0.65
statusMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…