Get the current running grid options
Get the native DOM element that contains grid-specific fields. This element has GridStack properties attached to it.
Static
addStatic
getExtract the selector string from an Angular component type.
The component type to get selector from
The component's selector string
A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.
wait until after all DOM is ready to init gridstack children (after angular ngFor and sub-components run first)
A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.
called when the TEMPLATE (not recommended) list of items changes - get a list of nodes and update the layout accordingly (which will take care of adding/removing items changed by Angular)
check if the grid is empty, if so show alternative content
Protected
hookget all known events as easy to use Outputs for convenience
Optional
grid: GridStackProtected
unhookOptional
grid: GridStackOptional
gridstackList of template-based grid items (not recommended approach). Used to sync between DOM and GridStack internals when items are defined in templates. Prefer dynamic component creation instead.
Optional
containerContainer for dynamic component creation (recommended approach). Used to append grid items programmatically at runtime.
Optional
isControls whether empty content should be displayed. Set to true to show ng-content with 'empty-content' selector when grid has no items.
Emitted when widgets are added to the grid
Emitted when grid layout changes
Emitted when grid is disabled
Emitted during widget drag operations
Emitted when widget drag starts
Emitted when widget drag stops
Emitted when widget is dropped
Emitted when grid is enabled
Emitted when widgets are removed from the grid
Emitted during widget resize operations
Emitted when widget resize starts
Emitted when widget resize stops
Component reference for dynamic component removal. Used internally when this component is created dynamically.
Static
selectorMapping of component selectors to their types for dynamic creation.
This enables dynamic component instantiation from string selectors. Angular doesn't provide public access to this mapping, so we maintain our own.
Protected
Optional
_Protected
Optional
_Protected
_Protected
Optional
loadedProtected
Readonly
element
Angular component wrapper for GridStack.
This component provides Angular integration for GridStack grids, handling:
Use in combination with GridstackItemComponent for individual grid items.
Example