Skip to content

Fix dependency injection issue in CustomTimespanShiftSelectorComponent#103

Open
vamshikiran065-jpg wants to merge 1 commit into52North:developfrom
vamshikiran065-jpg:patch-1
Open

Fix dependency injection issue in CustomTimespanShiftSelectorComponent#103
vamshikiran065-jpg wants to merge 1 commit into52North:developfrom
vamshikiran065-jpg:patch-1

Conversation

@vamshikiran065-jpg
Copy link
Copy Markdown

This PR resolves a potential dependency injection issue in CustomTimespanShiftSelectorComponent.

The component extends TimespanShiftSelectorComponent, which relies on Angular’s DI system. However, the Time service may not be properly injected if it is not explicitly provided or correctly passed through the constructor.

Changes made:
Ensured the Time service is correctly injected and passed to the parent constructor. Updated the constructor to use the override keyword for better compatibility with modern Angular versions. Clarified dependency handling to prevent runtime errors such as NullInjectorError.

These changes improve reliability and ensure proper integration with Angular’s dependency injection system.

This PR resolves a potential dependency injection issue in CustomTimespanShiftSelectorComponent.

The component extends TimespanShiftSelectorComponent, which relies on Angular’s DI system. However, the Time service may not be properly injected if it is not explicitly provided or correctly passed through the constructor.

Changes made:
Ensured the Time service is correctly injected and passed to the parent constructor.
Updated the constructor to use the override keyword for better compatibility with modern Angular versions.
Clarified dependency handling to prevent runtime errors such as NullInjectorError.

These changes improve reliability and ensure proper integration with Angular’s dependency injection system.
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