Releases: valor-software/ngx-bootstrap
Release list
v21.2.1
Bug Fixes
component-loader: Fixed a visual flash where popover content briefly appeared at the trigger element's location before being positioned correctly. This affected popovers using popoverContext in zoneless mode. (#6817)
typeahead: Fixed several accessibility issues (#6791):
Changed the container role from listbox to combobox for correct ARIA semantics
Switched from aria-owns to aria-controls per ARIA spec
Fixed activeChangeEvent not firing when the active item changed via keyboard navigation; it now consistently emits (emitting an empty string instead of undefined when cleared)
Refactoring / Internals
component-loader: Replaced the deprecated ComponentFactoryResolver API (removed in Angular 17+) with the modern createComponent() + EnvironmentInjector API. Affects dynamic overlay rendering for Modal, Tooltip, Popover, Typeahead, Dropdown, and Datepicker. (#6813)
animations: Removed the @angular/animations peer dependency. Collapse, Dropdown, Datepicker, and Typeahead now use pure CSS transitions with a shared animateExpand / onTransitionFinished utility (exported from ngx-bootstrap/utils). This reduces bundle size and removes the requirement to import BrowserAnimationsModule. Existing consumers do not need any code changes. (#6812)
v21.2.0
BREAKING CHANGES
- zoneless: Completed migration to Angular's zoneless change detection.
zone.jsis no longer required and has been removed from dependencies. - zoneless: All components now use
ChangeDetectionStrategy.OnPush. Applications must useprovideZonelessChangeDetection()in their bootstrap configuration. - inputs: All
@Input()decorators have been replaced with theinput()signal function API. Programmatic access to component inputs now requires signal read syntax (e.g.,component.myInput()instead ofcomponent.myInput). - outputs: All
@Output()decorators have been replaced with theoutput()function API. Output emissions continue to use.emit(). - services: Removed
NgZonedependency from carousel, component-loader, positioning service, and focus-trap. ReplacedNgZone.onStablewithafterRenderEffect(). - modules: Removed deprecated
forRoot()static method from all 17 module classes (AccordionModule, AlertModule, ButtonsModule, CarouselModule, CollapseModule, BsDatepickerModule, BsDropdownModule, FocusTrapModule, PaginationModule, PopoverModule, ProgressbarModule, RatingModule, SortableModule, TabsModule, TimepickerModule, TooltipModule, TypeaheadModule). These methods were no-ops returning empty providers and were deprecated since v18. Simply use the module directly in imports (e.g.,TooltipModuleinstead ofTooltipModule.forRoot()). - schematics:
ng addschematics now generate module imports without.forRoot().
Features
- core: Migrated to Angular 21.2.x
- core: Migrated 230+
@Input()decorators toinput()across 35 files - core: Migrated 70+
@Output()decorators tooutput()across 24 files - core: All 17 component groups updated for zoneless operation
- core: Added postinstall warning script for breaking change notifications on
npm install
Migration Guide
To upgrade from previous versions:
- Update Angular to
^21.2.0 - Remove
zone.jsfrom your polyfills and dependencies - Add
provideZonelessChangeDetection()to your app bootstrap providers - Update any programmatic input access from
component.proptocomponent.prop()(signal read) - See ZONELESS_MIGRATION_PLAN.md for the full migration guide