foundation: project guide, tooling, design tokens, bilingual shell and routing contracts
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
15
src/app/core/content/content.service.ts
Normal file
15
src/app/core/content/content.service.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { computed, inject, Injectable, type Signal } from '@angular/core';
|
||||
import { LocaleService } from '../i18n/locale.service';
|
||||
import { type RouteId } from '../routing/route-ids';
|
||||
import { type PageCopy } from './content.contracts';
|
||||
import { SITE_CONTENT } from './content.token';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class ContentService {
|
||||
private readonly localeService = inject(LocaleService);
|
||||
private readonly content = inject(SITE_CONTENT);
|
||||
|
||||
page(routeId: RouteId): Signal<PageCopy | undefined> {
|
||||
return computed(() => this.content[this.localeService.locale()].pages[routeId]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user