0

I'm developing an app and GridStack won't just play nicely with A2, i have managed to transpile it in webpack, however the plugin has 2 major flaws, i have to declare that the items rendered by ngFor are gridstack items and then hack an update triggering the window resize update in order to show the elements.

So far it's working but the second flaw is bad as hell, what happens is that the A2 model made by ngFor stops propagating the changes in data, that's just plain wrong, anyone have an idea how to fix, a better plugin or something for a dashboard page?

Maybe it's better to do it by hand, though i loose the drag'n drop features as well as responsiveness.

2 Answers2

0

I'm fairly new to Angular2 but I've been messing around with Gridster.js which seems to be pretty good. Works well with a dynamic *ngFor loops:

<div *ngFor="let dev of devs" class="col-1-4">    
    <div class="module dev grid-item" [ngGridItem]="{'col':dev.id,'dragHandle': 'header'}">
        <header>
            <!-- content in here -->
        </header>
    </div>
</div>

https://github.com/BTMorton/angular2-grid

Narvia
  • 1
  • 1
0

Have you tried using the gridstack-angular library?

dweiss
  • 832
  • 4
  • 9