mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
committed by
Jessica Janiuk
parent
d1919262f3
commit
6a616f81f3
@@ -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. */
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user