Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Migrate user-link template to Control Flow syntax

Alexander Brandon Colesc918b4403658
diff --git a/frontend/src/app/shared/components/user-link/user-link.component.ts b/frontend/src/app/shared/components/user-link/user-link.component.ts
index f6c9e6d9fe6..e8b5e83576a 100644
--- a/frontend/src/app/shared/components/user-link/user-link.component.ts
+++ b/frontend/src/app/shared/components/user-link/user-link.component.ts
@@ -34,16 +34,18 @@ import { PathHelperService } from 'core-app/core/path-helper/path-helper.service
@Component({
selector: 'op-user-link',
template: `
- <a *ngIf="href"
- data-hover-card-trigger-target="trigger"
- [attr.data-hover-card-url]="hoverCardUrl"
- [attr.href]="href"
- [attr.title]="label"
- [textContent]="name">
- </a>
- <ng-container *ngIf="!href">
+ @if (href) {
+ <a
+ data-hover-card-trigger-target="trigger"
+ [attr.data-hover-card-url]="hoverCardUrl"
+ [attr.href]="href"
+ [attr.title]="label"
+ [textContent]="name">
+ </a>
+ }
+ @else {
{{ name }}
- <ng-container>
+ }
`,
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,