1

I have a /admin URI and inside this there are 3 sub tabs

      <ngb-tabset class="col-lg-12" type="pills" class="customTab">
    <ngb-tab id="tab-lsp3">
      <ng-template ngbTabTitle>Model Tracker</ng-template>
      <ng-template ngbTabContent>
        <app-modeltracker></app-modeltracker>
      </ng-template>
    </ngb-tab>
    <!-- **** MAIN TAB4 **** -->
    <ngb-tab id="tab-lsp4">
      <ng-template ngbTabTitle>Class Label</ng-template>
      <ng-template ngbTabContent>
        <app-classlabel></app-classlabel>
      </ng-template>
    </ngb-tab>
  </ngb-tabset>

2 sub tab's contents are being pulled from different components and on switch between these 2 sub tabs, a password prompt page or pop up should appear and show the content of respective tabs only if the password is correct.\

How can this be achieved using Angular life cycle hooks?.

RONE
  • 5,415
  • 9
  • 42
  • 71
Manojkumar
  • 1,351
  • 5
  • 35
  • 63
  • Commeting to say that this sounds like a terrible (admin) user experience. Just require the password once when accessing the `/admin` resource(s) with a short TTL. – j1mbl3s Jun 15 '21 at 06:21
  • Mr @Manojkumar, first question why would you want a user to enter his credentail for every tab change, get the admin credential once and load the respective routes based on the permissions / logged-in user. – RONE Jun 15 '21 at 12:06

0 Answers0