mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(devtools): call change tab helper when tab changes as a result of the inspector being selected
This commit is contained in:
committed by
Minko Gechev
parent
2e5ff2f4d8
commit
cb4e86c016
@@ -16,7 +16,7 @@
|
||||
</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<a class="mat-tab-link" mat-tab-link *ngFor="let tab of tabs" (click)="onTabChange(tab)" [active]="activeTab === tab">
|
||||
<a class="mat-tab-link" mat-tab-link *ngFor="let tab of tabs" (click)="changeTab(tab)" [active]="activeTab === tab">
|
||||
{{ tab }}
|
||||
</a>
|
||||
<section *ngIf="angularVersion" id="app-angular-version">
|
||||
|
||||
@@ -61,7 +61,7 @@ export class DevToolsTabsComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
return this._applicationEnvironment.environment.process.env.LATEST_SHA;
|
||||
}
|
||||
|
||||
onTabChange(tab: 'Profiler' | 'Components' | 'Router Tree'): void {
|
||||
changeTab(tab: 'Profiler' | 'Components' | 'Router Tree'): void {
|
||||
this.activeTab = tab;
|
||||
this.tabUpdate.notify();
|
||||
if (tab === 'Router Tree') {
|
||||
@@ -77,7 +77,7 @@ export class DevToolsTabsComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
emitInspectorEvent(): void {
|
||||
if (this.inspectorRunning) {
|
||||
this._messageBus.emit('inspectorStart');
|
||||
this.activeTab = 'Components';
|
||||
this.changeTab('Components');
|
||||
} else {
|
||||
this._messageBus.emit('inspectorEnd');
|
||||
this._messageBus.emit('removeHighlightOverlay');
|
||||
|
||||
Reference in New Issue
Block a user