Installation
Detailed setup guide for @threadplane/render in your Angular application.
#Requirements
@threadplane/render uses Angular Signals, the input() function, and the NgComponentOutlet directive. Angular 20 or later is required.
Required for the build toolchain and package installation.
#Install the Package
#Peer Dependencies
The library requires the following peer dependencies:
| Package | Version |
|---|---|
@angular/core | ^20.0.0 or ^21.0.0 |
@angular/common | ^20.0.0 or ^21.0.0 |
@json-render/core | ^0.16.0 |
@angular/core and @angular/common are already part of any Angular 20+ project. You only need to install @json-render/core yourself if your package manager doesn't install peer dependencies automatically.
#Configure the Provider
Add provideRender() to your application config. This sets global defaults for every <render-spec> instance in your app.
provideRender() is just a convenience for setting global defaults. You can skip it entirely and pass registry, store, functions, and handlers as inputs directly to <render-spec>. Inputs always win over provider config.
#Minimal App Setup
Here's a complete minimal setup:
#Verify Installation
Once you're set up, run your app and check the rendered output:
If you see your component rendered with the expected props, you're done.
#Troubleshooting
"NullInjectorError: No provider for InjectionToken RENDER_CONFIG" -- This means you are trying to inject RENDER_CONFIG but did not call provideRender(). Either add provideRender() to your appConfig providers, or pass the registry and store directly as inputs to <render-spec>. The RENDER_CONFIG token is optional -- the component works without it.
Component not rendering -- Verify that the element type in your spec matches a key in your registry. For example, if your spec uses type: 'Text', your registry must have a Text entry. Use registry.names() to check registered component names.
Missing peer dependency -- If you see module resolution errors for @json-render/core, install it explicitly: npm install @json-render/core.