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

Function modelFunction

packages/core/src/authoring/model/model.ts:14–21  ·  view source on GitHub ↗
(
  initialValue?: T,
  opts?: ModelOptions,
)

Source from the content-addressed store, hash-verified

12import {createModelSignal, ModelOptions, ModelSignal} from './model_signal';
13
14export function modelFunction<T>(
15 initialValue?: T,
16 opts?: ModelOptions,
17): ModelSignal<T | undefined> {
18 ngDevMode && assertInInjectionContext(model);
19
20 return createModelSignal(initialValue, opts);
21}
22
23export function modelRequiredFunction<T>(opts?: ModelOptions): ModelSignal<T> {
24 ngDevMode && assertInInjectionContext(model);

Callers

nothing calls this directly

Calls 2

assertInInjectionContextFunction · 0.90
createModelSignalFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…