mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
- Move all styles to ng-devtools/src/styles. - Create a BrowserService that detects the browsers and adds it as a class to the body. Move global browser styles. - Create theme mixins that incorporate the browser type into them. - Refactor some of the affected code along with the introduced changes. PR Close #59589
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.dev/license
|
|
*/
|
|
|
|
import {Routes} from '@angular/router';
|
|
|
|
import {AppDevToolsComponent} from './devtools-app.component';
|
|
import {FrameManager} from '../../../projects/ng-devtools/src/lib/application-services/frame_manager';
|
|
import {Events, MessageBus, PriorityAwareMessageBus} from 'protocol';
|
|
import {IFrameMessageBus} from '../../iframe-message-bus';
|
|
|
|
export const DEVTOOL_ROUTES: Routes = [
|
|
{
|
|
path: '',
|
|
component: AppDevToolsComponent,
|
|
pathMatch: 'full',
|
|
providers: [
|
|
{
|
|
provide: MessageBus,
|
|
useFactory(): MessageBus<Events> {
|
|
return new PriorityAwareMessageBus(
|
|
new IFrameMessageBus(
|
|
'angular-devtools',
|
|
'angular-devtools-backend',
|
|
() => (document.querySelector('#sample-app') as HTMLIFrameElement).contentWindow!,
|
|
),
|
|
);
|
|
},
|
|
},
|
|
{provide: FrameManager, useFactory: () => FrameManager.initialize(null)},
|
|
],
|
|
},
|
|
];
|