chore(edit-content): Use new Angular Syntax in DotNavigationComponent #30403
+265
−233
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Parent Issue
#30401
Proposed Changes
This pull request includes some changes to the
dot-navigation
components in thedotcms-ui
application. The primary focus is on refactoring the code to use Angular's new reactive primitives and simplifying the template syntax.Template Refactoring:
core-web/apps/dotcms-ui/src/app/view/components/dot-navigation/components/dot-nav-icon/dot-nav-icon.component.html
: Replaced*ngIf
andng-template
with Angular's new@if
and@else
syntax.core-web/apps/dotcms-ui/src/app/view/components/dot-navigation/components/dot-sub-nav/dot-sub-nav.component.html
: Updated*ngFor
to use the new@for
syntax with tracking. [1] [2]core-web/apps/dotcms-ui/src/app/view/components/dot-navigation/dot-navigation.component.html
: Replaced*ngFor
and async pipe with@for
and reactive signals.Component Refactoring:
core-web/apps/dotcms-ui/src/app/view/components/dot-navigation/dot-navigation.component.ts
: Replaced constructor dependency injection with theinject
function and usedtoSignal
to convert observables to signals. [1] [2]core-web/apps/dotcms-ui/src/app/view/components/dot-navigation/dot-navigation.component.ts
: Updated method calls to use private fields for services. [1] [2] [3]Checklist
Screenshots
This PR fixes: #30401