Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular19 version 14 mistakes #316

Open
wjaspers opened this issue Feb 1, 2025 · 1 comment
Open

Angular19 version 14 mistakes #316

wjaspers opened this issue Feb 1, 2025 · 1 comment

Comments

@wjaspers
Copy link
Contributor

wjaspers commented Feb 1, 2025

I made a handful of mistakes without having a clear idea of Angular's decision behind moving to standalone: true as the default for components.

I will promptly be making a push for v15.

Sorry to everyone for all the confusion and need to upgrade again...

@wjaspers
Copy link
Contributor Author

wjaspers commented Feb 2, 2025

SatPopover should still be working, since the compiler is aware of SatPopoverAnchoringService through the SatPopoverComponent and its directives, but things are a bit clunky. importProvidersFrom() isn't exactly ideal, nor is it clear where the AnchoringService is being loaded.

Angular <19

@NgModule({
   declarations: [ SatPopoverComponent, SatPopoverAnchorDirective, SatPopoverHoverDirective ],
   exports: [ SatPopoverComponent, SatPopoverAnchorDirective, SatPopoverHoverDirective ],
   providers: [ SatPopoverAnchoringService ],
   ... // etc.
})
class SatPopoverModule {}
@NgModule({
  imports: [ SatPopoverModule ],
  ... // etc.
})
class MyApplicationModule {}

bootstrapApplication(MyApplicationModule);

Angular 19+

@NgModule({
   imports: [ SatPopoverComponent, SatPopoverAnchorDirective, SatPopoverHoverDirective ],
   exports: [ SatPopoverComponent, SatPopoverAnchorDirective, SatPopoverHoverDirective ],
   ... // etc.
})
class SatPopoverModule {}

Current behavior

import { SatPopoverModule } from '@ncstate-sat/popover';

bootstrapApplication(MyApplicationRootComponent, [
  importProvidersFrom(SatPopoverModule)
])

Updated behavior

import { provideEnvironmentSatPopover } from '@ncstate-sat/popover';

bootstrapApplication(MyApplicationRootComponent, [
  provideEnvironmentSatPopover()
])

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

No branches or pull requests

1 participant