// src/app/shared/store/store.service.ts
import { computed, Injectable, signal } from '@angular/core';
@Injectable({ providedIn: 'root' })
export class StoreService {
public readonly isSubPage = signal<boolean>(false);
public setIsSubPage(value: boolean): void {
this.isSubPage.set(value);
}
}
<div class="container">
@if (store.isSubPage()) {
<div class="grid md:grid-cols-[1fr_360px] gap-6">
<main class="bg-surface-card-light dark:bg-primary-900 rounded-2xl p-6 shadow-2xl w-full">
<router-outlet />
</main>
@if (store.isLoading()) {
<p-skeleton height="222px" class="mb-2" />
} @else {
<app-sidebar />
}
</div>
} @else {
<app-news></app-news>
}
</div>