--- /dev/null
+
+<ngb-tabset #tabs [activeId]="attrType" (tabChange)="onTabChange($event)">
+ <ngb-tab title="Bibliographic Attributes" i18n-title id="bib">
+ <ng-template ngbTabContent>
+ <div class="mt-3">
+ <eg-admin-page idlClass="vqbrad"></eg-admin-page>
+ </div>
+ </ng-template>
+ </ngb-tab>
+ <ngb-tab title="Authority Attributes" i18n-title id="authority">
+ <ng-template ngbTabContent>
+ <div class="mt-3">
+ <eg-admin-page idlClass="vqarad"></eg-admin-page>
+ </div>
+ </ng-template>
+ </ngb-tab>
+</ngb-tabset>
--- /dev/null
+import {Component, OnInit, ViewChild} from '@angular/core';
+import {Router, ActivatedRoute, ParamMap} from '@angular/router';
+import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap';
+
+@Component({
+ templateUrl: 'display-attrs.component.html'
+})
+export class DisplayAttrsComponent {
+
+ attrType: string;
+
+ constructor(
+ private router: Router,
+ private route: ActivatedRoute) {
+
+ this.route.paramMap.subscribe((params: ParamMap) => {
+ this.attrType = params.get('atype');
+ });
+ }
+
+ // Changing a tab in the UI means changing the route.
+ // Changing the route ultimately results in changing the tab.
+ onTabChange(evt: NgbTabChangeEvent) {
+ this.attrType = evt.nextId;
+
+ // prevent tab changing until after route navigation
+ evt.preventDefault();
+
+ const url =
+ `/staff/cat/vandelay/display_attrs/${this.attrType}`;
+
+ this.router.navigate([url]);
+ }
+}
+