docs(docs-infra): code style improvement and component update (#63557)

- Improved code style consistency in docs-infra
- Updated app.component.ts for enhancements

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>

PR Close #63557
This commit is contained in:
Shuaib Hasan Akib
2025-09-03 02:52:22 +06:00
committed by Jessica Janiuk
parent d1919262f3
commit 6a616f81f3
5 changed files with 8 additions and 9 deletions
@@ -51,7 +51,7 @@ export function formatHeading(
// TODO(josephperrott): Set edit content url based on the owner, repo and branch.
/** The base url for edting the a file in the repository. */
/** The base url for editing the a file in the repository. */
const GITHUB_EDIT_CONTENT_URL = 'https://github.com/angular/angular/edit/main';
/** Get the page title with edit button to modify the page source. */
+3 -3
View File
@@ -57,9 +57,9 @@ export class AppComponent {
protected isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
protected displaySecondaryNav = signal(false);
protected displayFooter = signal(false);
protected displaySearchDialog = inject(IS_SEARCH_DIALOG_OPEN);
protected readonly displaySecondaryNav = signal(false);
protected readonly displayFooter = signal(false);
protected readonly displaySearchDialog = inject(IS_SEARCH_DIALOG_OPEN);
constructor() {
this.closeSearchDialogOnNavigationSkipped();
+1 -2
View File
@@ -11,7 +11,6 @@ import {IS_SEARCH_DIALOG_OPEN, Search} from '@angular/docs';
import {RouterOutlet} from '@angular/router';
@Component({
standalone: true,
selector: 'adev-main',
imports: [RouterOutlet],
template: `<router-outlet />`,
@@ -19,7 +18,7 @@ import {RouterOutlet} from '@angular/router';
export default class MainComponent {
private readonly displaySearchDialog: WritableSignal<boolean> = inject(IS_SEARCH_DIALOG_OPEN);
private readonly searchService = inject(Search);
search = model<string | undefined>('');
readonly search = model<string | undefined>('');
constructor() {
effect(() => {
+1 -1
View File
@@ -43,7 +43,7 @@ const httpTesting = TestBed.inject(HttpTestingController);
// Load `ConfigService` and request the current configuration.
const service = TestBed.inject(ConfigService);
const config$ = this.configService.getConfig<Config>();
const config$ = service.getConfig<Config>();
// `firstValueFrom` subscribes to the `Observable`, which makes the HTTP request,
// and creates a `Promise` of the response.