gbkannan89 commented on code in PR #7585:
URL: https://github.com/apache/trafficcontrol/pull/7585#discussion_r1276417394


##########
experimental/traffic-portal/src/app/shared/navigation/tp-sidebar/tp-sidebar.component.html:
##########
@@ -17,9 +17,24 @@
                <div id="sidenav-container">
                        <mat-tree [dataSource]="dataSource" 
[treeControl]="treeCtrl" id="sidebar-nav-tree">
                                <mat-tree-node *matTreeNodeDef="let node" 
matTreeNodeToggle>
-                                       <a class="mat-tree-node" mat-menu-item 
[attr.aria-label]="'Navigate to ' + node.name" [routerLink]="node.href" 
[routerLinkActive]="['boldNode']" [routerLinkActiveOptions]="routeOptions">
-                                               {{node.name}}
-                                       </a>
+                                       <!-- load either redirect or relative 
path href -->
+                                       <div *ngIf="isAbsoluteURL(node.href); 
then obsoluteHrefBlock else relativeHrefBlock"></div>
+                               
+                                       <!-- Checking whether href is relative 
URL -->
+                                       <ng-template #relativeHrefBlock>
+                                               <a class="mat-tree-node" 
mat-menu-item [attr.aria-label]="'Navigate to ' + node.name" 
[routerLink]="node.href"
+                                                       
[routerLinkActive]="['boldNode']" [routerLinkActiveOptions]="routeOptions">
+                                                       {{node.name}}
+                                               </a>
+                                       </ng-template>
+                               
+                                       <!-- Checking whether href is absolute 
URL - For TPv1 redirect purpose -->
+                                       <ng-template #obsoluteHrefBlock>

Review Comment:
   do you want the change the name to obsoluteHrefBlock -> absolute ? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to