v8

Custom Loading

Create a custom loading

Custom loading component/ng-template accepts any kind of component/ng-template. It has nothing special to do.

Overwrite all the loadings

Using provider

import { Component } from '@angular/core';
import { provideNgDynamicJsonForm } from 'ng-dynamic-json-form';
import { CustomLoadingComponent } from '...';

@Component({
  ...
  providers: [
    provideNgDynamicJsonForm({
      ...
      loadingComponent: CustomLoadingComponent
    }),
  ]
})

Using component

<ng-dynamic-json-form
  ...
  [loadingComponent]="loadingComponent"
></ng-dynamic-json-form>
import { CustomLoadingComponent } from "...";

loadingComponent = CustomLoadingComponent;

Using template

<ng-dynamic-json-form 
  ... 
  [loadingTemplate]="loadingTemplate"
></ng-dynamic-json-form>

<ng-template #loadingTemplate>...</ng-template>