NgxPropertyGrid
A small and simple property grid in angular to view/edit POJOs, excellent if you have a "settings" object you want to give the user to edit (that's why I have created it). Play online.
Dependencies
Usage
Import
If you need animation,you should import BrowserAnimationsModule
in your app.module.ts
.
Getting Started
The metadata options declare
As seen from the example above the metadata object can be used (it's optional) in order to describe the object properties.
Each proprty in the metadata object could have the following:
- name - The display name of the property in the grid
- description - A description of the property, will be used as tooltip on an hint element (a span with text "[?]")
- hidden - Whether this property should be hidden in the grid, default is false (can be omitted).
- group - The group this property belongs to
- type - The type of the property, supported are:
- boolean or checkbox - A checkbox would be used
- number - simple textbox
- color - simple textbox
- options - A dropdown list would be used in case the metadata contains the
options
array property
- label - A label will be used, useful for uneditable / read-only properties
- colspan2 - true/false. If true then property input will span both columns and will have no name/label (useful for textarea custom type)