Skip to content

Angular documentation #2944

@E4RIJMP

Description

@E4RIJMP

Hi,
I wanted to try out gridstack.js for an Angular project an ran into several issues:

  • Most of the links on the https://gridstackjs.com/demo/index.html page regarding the Angular Wrapper are dead.
  • The very first code example in the README.md at https://github.com/gridstack/gridstack.js/tree/master/angular/ does not work.
    • So, under "Dynamic grid items" the combination of "HTML" 🡒 "<gridstack [options]="gridOptions"></gridstack>" and "Standalone Component Code" 🡒 "public gridOptions: GridStackOptions" does not seem to create proper items. It will work if either "GridStackOptions" is replaced with "NgGridStackOptions" or the HTML is altered in a way where items are created e.g., via @for. Most likely it's supposed to be the former. Then the import of "GridstackItemComponent" seems to be unnecessary.
  • In the "More Complete example" it says "// or call load()/addWidget() with same data" for "{x:0, y:0, minW:2, selector:'app-a'}" but "addWidget()" is typed as "addWidget(w: GridStackWidget): GridItemHTMLElement;" and "GridStackWidget" does not support "selector" (unlike "NgGridStackWidget"). So, the type of "w" probably needs to be changed.

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions