LP1816475: use [routerLink] instead of href in Angular app
authorJane Sandberg <sandbej@linnbenton.edu>
Wed, 9 Oct 2019 18:42:08 +0000 (11:42 -0700)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 21 Oct 2019 19:43:11 +0000 (15:43 -0400)
Using <a href=""> forces a reload of the Angular app in the user's
browser, which substantially slows down the experience.  This commit
changes some href attributes to routerLink directives in the booking
navigation menu.

Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/eg2/src/app/staff/nav.component.html

index d682541..265368a 100644 (file)
           Booking
         </a>
         <div class="dropdown-menu" ngbDropdownMenu>
-          <a class="dropdown-item" href="staff/booking/create_reservation">
+          <a class="dropdown-item" routerLink="/staff/booking/create_reservation">
             <span class="material-icons">add</span>
             <span i18n>Create Reservations</span>
           </a>
-          <a class="dropdown-item" href="staff/booking/pull_list">
+          <a class="dropdown-item" routerLink="/staff/booking/pull_list">
             <span class="material-icons">list</span>
             <span i18n>Pull List</span>
           </a>
             <span class="material-icons">pin_drop</span>
             <span i18n>Capture Resources</span>
           </a>
-          <a class="dropdown-item" href="staff/booking/pickup">
+          <a class="dropdown-item" routerLink="/staff/booking/pickup">
             <span class="material-icons">trending_up</span>
             <span i18n>Pick Up Reservations</span>
           </a>
-          <a class="dropdown-item" href="staff/booking/return">
+          <a class="dropdown-item" routerLink="/staff/booking/return">
             <span class="material-icons">trending_down</span>
             <span i18n>Return Reservations</span>
           </a>
-          <a class="dropdown-item" href="staff/booking/manage_reservations">
+          <a class="dropdown-item" routerLink="/staff/booking/manage_reservations">
             <span class="material-icons">layers</span>
             <span i18n>Manage Reservations</span>
           </a>