mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00: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:
parent
7c1a16db26
commit
c5ca597aeb
1 changed files with 7 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue