npm angular-gridster2 21.0.0
21.0.0 (2025-11-29)

3 hours ago

Support for Angular 21

These are the biggest changes done to the library in years. Thank you @ChargeIn for the help!
It was done to keep the library up to date with the trend that Angular is going into and to keep compatiblity with Angular for years to come. Hopefully these kind of changes are required again only once in some 5+ years.
Understand that changes on the application usages of the library are necessary to keep it working correctly.

Bug fixes

Improvements

  • feat: enable ChangeDetectionStrategy.OnPush on all components b556b92
  • refactor: change from @Input to signal input() for gridster options 60cce62
  • feat: new api.calculateLayout() 60cce62
  • feat: initCallback() has a new parameter gridsterApi
  • refactor: improve gridster drag animations (#953) 669ec93 Thanks @ChargeIn
  • refactor: demo app rename components to match the new angular styleguide 016139a
  • refactor: change GridsterItem @input to signal input() fb914f7
  • refactor: remove *.service suffix from files 207b5af
  • refactor: component GridsterPreviewComponent renamed to GridsterPreview 207b5af
  • refactor: remove *.interface from gridsterResizeEventType.ts 207b5af
  • refactor: type GridsterItem renamed to GridsterItemConfig b18d68a
  • refactor: component GridsterItemComponent renamed to GridsterItem b18d68a
  • refactor: rename files GridsterItem, GridsterItemConfig and GridsterConfig b18d68a
  • refactor: remove internal interface GridsterConfigS 5f7a4c4
  • refactor: remove GridsterComponentInterface & GridsterItemComponentInterface 5f7a4c4
  • refactor: convert remaining interfaces to types 5f7a4c4
  • refactor: rename Gridster component to the newest angular guidelines 06b0062 Thanks @ChargeIn
  • refactor: migrate @output to signal output() 0f91046
  • refactor: change gridsterPreview.component.ts input to inject gridster 0f91046
  • refactor: migrate to inject() from constructor inject 0f91046
  • refactor: migrate to host from @HostBinding 0f91046
  • chore: remove zone.js in demo app and add markForCheck in draggable. 0f91046
    Keeping NgZone.run and NgZone.runOutsideAngular for apps still using zone.js to keep the performance high
    https://angular.dev/guide/zoneless#remove-ngzoneonmicrotaskempty-ngzoneonunstable-ngzoneisstable-or-ngzoneonstable

Breaking changes

  • gridster api is now available via initCallback or viewChild(Gridster).api 60cce62
  • gridster.api.optionsChanged() was removed set a new object on input options when there is a change 60cce62
  • removed updateOptions() from GridsterItem fb914f7
  • removed GridsterModule 533b8a8
  • rename of components and service classes according to Angular Styleguide 207b5af b18d68a 06b0062

Don't miss a new angular-gridster2 release

NewReleases is sending notifications on new releases.