angular/devtools/projects/shell-browser/src/app/app.component.ts

27 lines
646 B
TypeScript
Raw Normal View History

/**
* @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.io/license
*/
import {ChangeDetectorRef, Component, inject, OnInit} from '@angular/core';
2020-01-27 18:40:18 +00:00
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
2020-01-27 18:40:18 +00:00
})
export class AppComponent implements OnInit {
private _cd = inject(ChangeDetectorRef);
2020-01-27 18:40:18 +00:00
ngOnInit(): void {
chrome.devtools.network.onNavigated.addListener(() => {
window.location.reload();
});
this._cd.detectChanges();
2020-01-27 18:40:18 +00:00
}
}