mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(devtools): switch to components tab whenever the inspector is used (#60694)
Switch to the components tab, if not there, when a component is selected via the inspector. PR Close #60694
This commit is contained in:
@@ -95,6 +95,13 @@ export class DevToolsTabsComponent {
|
||||
this.routes.set(routes || []);
|
||||
});
|
||||
|
||||
// Change the tab to Components, if an element is selected via the inspector.
|
||||
this._messageBus.on('selectComponent', () => {
|
||||
if (this.activeTab() !== 'Components') {
|
||||
this.changeTab('Components');
|
||||
}
|
||||
});
|
||||
|
||||
if (typeof chrome !== 'undefined' && chrome.runtime !== undefined) {
|
||||
this.extensionVersion.set(chrome.runtime.getManifest().version);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user