1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Angular application with gridstack.js adding dynamic components via addWidget

Discussão em 'Angular' iniciado por Fabian, Julho 22, 2025.

  1. Fabian

    Fabian Guest

    I am looking for sample code how to dynamically add components to an Angular application with a gridstack.js grid on a button click.

    What I want to do in detail is to e.g. have a parameter that selects which Angular component to add to a grid and then on a button click called "add" I want to dynamically add an instance of the component to the grid. The component should also be able to receive some input representing settings and able to be moved around and resized.

    My understanding is that it is better to implement this using the gridstack element rather than using a raw ngfor and callind addWidget. But I can't figure out what to pass to addWidget to make this happen.

    Continue reading...

Compartilhe esta Página