initializeModel
initializeModel(
model
,injector?
):SignalModelAdapter
Creates a model adapter with initial nodes, edges, and metadata.
This helper sets up a model instance ready for use in ng-diagram.
It must be run in an Angular injection context unless the injector
option is provided manually.
⚠️ This is only for creating the initial model. Any changes to the model or access to current data should be done via NgDiagramModelService.
Parameters
Section titled “Parameters”Partial
<Model
> = {}
Initial model data (nodes, edges, metadata).
injector?
Section titled “injector?”Injector
Optional Angular Injector
if not running inside an injection context.
Returns
Section titled “Returns”SignalModelAdapter