I'm following this example, trying to implement it in Angular.
I import as follows (no jQuery dependencies):
import * as GridStack from 'gridstack/dist/gridstack-h5';
And the code
ngAfterViewInit() {
var items = [
{content: 'my first widget'}, // will default to location (0,0) and 1x1
{w: 2, content: 'another longer widget!'} // will be placed next at (1,0) and 2x1
];
var grid = GridStack.init();
grid.load(items);
}
But all I see is static divs instead of a grid, and there are no errors. What's missing?