Angular how to pass data to custom renderer

Hello everyone I use jsonforms angular, and below is my code where I pass data to my jsonform

           <jsonforms

                  [schema]="activeSchema"

                  [data]="getModel(activeSchema.sysName)"

                  (onChange)="activeSchema.model = $event['value']"

                  [renderers]="renderers"

                >

           </jsonforms>

So how can I use the [data] property in my custom renderer?

Usually renderers work with scoped data, i.e. what the scope in their UI Schema element refers to. The scoped data is available via this.data.

If you’d like to access the whole data object in your renderer then you can do so via the JsonFormsAngularService injected in the constructor of your custom renderer.

1 Like