|
4 | 4 | <button (click)="show=0">Simple</button> |
5 | 5 | <button (click)="show=1">ngFor case</button> |
6 | 6 | <button (click)="show=2">ngFor custom command</button> |
7 | | - <button (click)="show=3">Component ngFor</button> |
8 | | - <button (click)="show=4">Component Dynamic</button> |
| 7 | + <button (click)="show=3">Component HTML template</button> |
| 8 | + <button (click)="show=4">Component ngFor</button> |
| 9 | + <button (click)="show=5">Component Dynamic</button> |
9 | 10 | </div> |
10 | 11 |
|
11 | 12 | <div class="test-container"> |
|
14 | 15 | <angular-ng-for-cmd-test *ngIf="show===2"></angular-ng-for-cmd-test> |
15 | 16 |
|
16 | 17 | <div *ngIf="show===3" > |
| 18 | + <p><b>COMPONENT template</b>: using DOM template to use components statically</p> |
| 19 | + <button (click)="add(gridComp)">add item</button> |
| 20 | + <button (click)="delete(gridComp)">remove item</button> |
| 21 | + <button (click)="modify(gridComp)">modify item</button> |
| 22 | + <button (click)="newLayout(gridComp)">new layout</button> |
| 23 | + <gridstack #gridComp [options]="gridOptions" (changeGS)="onChange($event)" (resizestop)="onResizeStop($event)"> |
| 24 | + <gridstack-item gs-x="1" gs-y="0">item 1</gridstack-item> |
| 25 | + <gridstack-item gs-x="3" gs-y="0" gs-w="2">item 2 wide</gridstack-item> |
| 26 | + </gridstack> |
| 27 | +</div> |
| 28 | + |
| 29 | +<div *ngIf="show===4" > |
17 | 30 | <p><b>COMPONENT ngFor</b>: Most complete example that uses Component wrapper for grid and gridItem</p> |
18 | 31 | <button (click)="addNgFor()">add item</button> |
19 | 32 | <button (click)="deleteNgFor()">remove item</button> |
|
26 | 39 | </gridstack> |
27 | 40 | </div> |
28 | 41 |
|
29 | | -<div *ngIf="show===4" > |
| 42 | +<div *ngIf="show===5" > |
30 | 43 | <p><b>COMPONENT dynamic</b>: Best example that uses Component wrapper and dynamic grid creation (drag between grids, from toolbar, etc...)</p> |
31 | 44 | <button (click)="add(gridComp)">add item</button> |
32 | 45 | <button (click)="delete(gridComp)">remove item</button> |
|
0 commit comments