From a243dbc6823821dbc02f96cef4e9f8754e4c8bd5 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 17:51:57 +0000 Subject: [PATCH] refactor(code): align snippets with architectural safety standards in frontend/angular/architecture.md Co-authored-by: beginwebdev2002 <102213457+beginwebdev2002@users.noreply.github.com> --- frontend/angular/architecture.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/angular/architecture.md b/frontend/angular/architecture.md index a656043..4604730 100644 --- a/frontend/angular/architecture.md +++ b/frontend/angular/architecture.md @@ -180,7 +180,7 @@ Extract logic into services/signals. Leave only formatting to pipes. > **Context:** TypeScript Safety ### ❌ Bad Practice ```typescript -getData(): Observable { ... } +getData(): Observable { ... } ``` ### ⚠️ Problem `any` disables type checking, nullifying the benefits of TypeScript. Errors only surface at runtime. @@ -212,7 +212,7 @@ Use aliases in the template (`as varName`) or convert the stream to a signal (`t > **Context:** DI Scopes ### ❌ Bad Practice ```typescript -@Injectable({ providedIn: 'unknown' }) +@Injectable({ providedIn: 'any' }) ``` ### ⚠️ Problem Creates a new service instance for each lazy-loaded module. This is often unexpected behavior, leading to state desynchronization (different singleton instances).