core
core copied to clipboard
chore(edit-content): Use new Angular Syntax in DotNavigationComponent
Parent Issue
https://github.com/dotCMS/core/issues/30401
Proposed Changes
This pull request includes some changes to the dot-navigation
components in the dotcms-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
- [x] Tests
- [x] Translations
- [x] Security Implications Contemplated (add notes if applicable)