Skip to content

refactor(component-loader): replace ComponentFactoryResolver with createComponent#6813

Open
DerekLiang wants to merge 3 commits into
valor-software:developmentfrom
DerekLiang:dl/2026-05/ComponentFactoryResolver-removal
Open

refactor(component-loader): replace ComponentFactoryResolver with createComponent#6813
DerekLiang wants to merge 3 commits into
valor-software:developmentfrom
DerekLiang:dl/2026-05/ComponentFactoryResolver-removal

Conversation

@DerekLiang
Copy link
Copy Markdown
Contributor

@DerekLiang DerekLiang commented May 28, 2026

Summary

  • ComponentFactoryResolver Blocks upgrade to Angular 22rc1.
  • Removes the deprecated ComponentFactoryResolver (deprecated in Angular 13, removed in Angular 17+) from ComponentLoaderFactory and ComponentLoader
  • Replaces ComponentFactory.create() calls with the modern createComponent() function from @angular/core
  • Injects EnvironmentInjector in place of ComponentFactoryResolver

Affected components

All components that use ComponentLoaderFactory to dynamically render overlay/popup content are affected by this change:

Component File
Modal src/modal/modal.directive.ts, src/modal/bs-modal.service.ts
Tooltip src/tooltip/tooltip.directive.ts
Popover src/popover/popover.directive.ts
Typeahead src/typeahead/typeahead.directive.ts
Dropdown src/dropdown/bs-dropdown.directive.ts
Datepicker src/datepicker/bs-datepicker.component.ts, src/datepicker/bs-daterangepicker.component.ts
Datepicker inline src/datepicker/bs-datepicker-inline.component.ts, src/datepicker/bs-daterangepicker-inline.component.ts

Test plan

  • Modal opens and closes correctly
  • Tooltip appears on hover/focus and dismisses
  • Popover appears and dismisses
  • Typeahead dropdown renders suggestions
  • Dropdown opens and closes
  • Datepicker and Daterangepicker open, select dates, and close
  • Inline datepicker/daterangepicker renders in-place
  • All existing unit tests pass (npm test)

🤖 Generated with Claude Code

DerekLiang and others added 2 commits May 6, 2026 12:56
…ateComponent

ComponentFactoryResolver was deprecated in Angular 13 and removed in
Angular 17+. Replace all usages with the modern createComponent() API
and EnvironmentInjector.

Affects: Modal, Tooltip, Popover, Typeahead, Dropdown, Datepicker,
and Daterangepicker — all components that use ComponentLoaderFactory
to dynamically render overlay/popup content.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@DerekLiang DerekLiang force-pushed the dl/2026-05/ComponentFactoryResolver-removal branch from c858183 to fb7b08f Compare May 28, 2026 19:02
@DerekLiang
Copy link
Copy Markdown
Contributor Author

@lexasq could you please take a look and provide feedback? thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant