Skip to content

Commit a4d8ba6

Browse files
committed
demo Angular - updated code to Ang13+
* ComponentFactoryResolver is no longer needed * select="[empty-content]" *ngIf="isEmpty" is cleaner * added bug caveat to readme.
1 parent 3ff699e commit a4d8ba6

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

demo/angular/src/app/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ to build the demo, go to demo/angular and run `yarn` + `yarn start` and Navigate
8383

8484
- This wrapper needs v7.2+ to run as it needs the latest changes
8585
- Code isn't compiled into a lib YET. You'll need to copy those files. Let me know (slack) if you are using it...
86+
- BUG: content doesn't appear on new widget until widget is moved around (or another created that pushes it). Need to force angular detection changes...
8687

8788
## ngFor Caveats
8889
- This wrapper handles well ngFor loops, but if you're using a trackBy function (as I would recommend) and no element id change after an update,

demo/angular/src/app/app.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ export class AppComponent {
5252
* TEST dynamic grid operations - uses grid API directly (since we don't track structure that gets out of sync)
5353
*/
5454
public add(gridComp: GridstackComponent) {
55+
// TODO: BUG the content doesn't appear until widget is moved around (or another created). Need to force
56+
// angular detection changes...
5557
gridComp.grid?.addWidget({x:3, y:0, w:2, content:`item ${ids}`, id:String(ids++)});
5658
}
5759
public delete(gridComp: GridstackComponent) {

0 commit comments

Comments
 (0)