Skip to content

Commit 16bc399

Browse files
Update series 6 blogs: fix 6.3 narrative, resolve duplicate 6.5 numbering
1 parent 9911b38 commit 16bc399

3 files changed

Lines changed: 18 additions & 17 deletions

File tree

blogs/series-6-ai-app-features/6.3-angular-ai-chat-widget.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Build a Dedicated AI Section in Angular with Submenu Navigation
22

3-
## How to Refactor a Tabbed Widget into Four Focused Standalone Pages
3+
## How to Build Four Focused Standalone Pages with Sidebar Sub-Menu Navigation
44

5-
A single component with tabs works well for two modes. It breaks down at four. This article refactors the TalentManagement Angular app's AI features from a single `ai-chat` route with tabs into a proper **AI submenu** — four dedicated pages, each with a single responsibility, registered as children of an `ai` route group in the sidebar.
5+
AI features deserve their own section. This article adds a proper **AI submenu** to the TalentManagement Angular app — four dedicated pages, each with a single responsibility, registered as children of an `ai` route group in the sidebar. Each page is a standalone Angular component with its own route, template, and styles.
66

77
![AI Submenu — Four dedicated AI pages in Angular Material sidebar](https://raw.githubusercontent.com/workcontrolgit/AngularNetTutorial/master/docs/images/angular/application-dashboard-anonymous.png)
88

@@ -192,7 +192,7 @@ src/app/routes/ai/
192192

193193
#### AI Assistant Component
194194

195-
This page extracts the "General Chat" tab from the original `ai-chat` page and gives it a dedicated route.
195+
This page provides general-purpose chat with the LLM at a dedicated route.
196196

197197
**`ai-assistant.component.ts`:**
198198

@@ -274,15 +274,15 @@ export class AiAssistantComponent implements OnDestroy {
274274

275275
**Key design decisions:**
276276

277-
* **Extracted from the old `AiChatComponent` General Chat tab**All the chat logic moved here unchanged. The only difference is the selector name and that it's no longer wrapped in a `MatTabGroup`.
277+
* **Single responsibility**This component handles only the general chat flow. HR Insight, NL Search, and Vector Search each live in their own component.
278278
* **`private destroy$ = new Subject<void>()`** — The `takeUntil` pattern ensures in-flight Ollama requests are cancelled cleanly when the user navigates away.
279279
* **State is scoped to this component** — Navigating to HR Insight and back does not clear the chat history here.
280280

281281
---
282282

283283
#### HR Insight Component
284284

285-
Extracts the "HR Insights" tab. Full implementation follows the same pattern as AI Assistant — replace `chat()` with `hrInsight()` and add the suggestion chips.
285+
Provides data-aware chat grounded in live workforce metrics. Full implementation follows the same pattern as AI Assistant — replace `chat()` with `hrInsight()` and add the suggestion chips.
286286

287287
The `ai-hr-insight.component.ts` structure is identical to AI Assistant, differing only in:
288288
* Calls `aiService.hrInsight(question)` instead of `aiService.chat(message)`
@@ -435,18 +435,18 @@ public/
435435

436436
## 📊 Real-World Impact
437437

438-
**Before this article:**
438+
**Without this structure:**
439439

440-
*One page with two tabs — grows unmanageable as AI features are added
441-
*Single route `/ai-chat` — no URL structure for bookmarking or deep linking
442-
*All AI features in one file — a change to HR Insight breaks the General Chat component
440+
*A flat sidebar link gives AI one entry point — no room to grow
441+
*Mixing AI features in a single component creates tight coupling — a change to HR Insight risks breaking General Chat
442+
*No URL structure for bookmarking or deep linking into specific AI tools
443443

444-
**After this article:**
444+
**With this structure:**
445445

446446
* ✅ Four focused pages — each component is ~80 lines, easy to read and test independently
447447
* ✅ Clean URL structure — `/ai/assistant`, `/ai/hr-insight`, `/ai/nl-search`, `/ai/vector-search`
448448
* ✅ Sidebar group — users discover all four AI features naturally via the collapsible sub-menu
449-
*Zero breakagethe backward-compat redirect keeps existing bookmarks working
449+
*Backward-compat redirectany old `/ai-chat` bookmarks silently redirect to `/ai/assistant`
450450

451451
---
452452

@@ -481,7 +481,8 @@ The refactoring from tabs to child routes mirrors how any growing feature sectio
481481
* [Run a Local LLM in Your .NET 10 API with Ollama](6.1-dotnet-ai-foundation.md) — AI Foundation (Series 6.1)
482482
* [Build an HR AI Assistant That Knows Your Data](6.2-dotnet-ai-hr-assistant.md) — HR AI Assistant (Series 6.2)
483483
* **This Article** — Build a Dedicated AI Section in Angular with Submenu Navigation (Series 6.3)
484-
* [Natural Language Employee Search in Angular Material](6.4-angular-ai-nl-search.md) — NL Search (Series 6.4)
484+
* [Natural Language Employee Search in Angular Material](6.4-angular-ai-nl-search.md) — NL Search Angular (Series 6.4)
485+
* [Natural Language Employee Search with LLM Query Parsing](6.4.1-dotnet-natural-language-search.md) — NL Search .NET backend (Series 6.4.1)
485486
* [Semantic Position Search with Vector Embeddings](6.5-angular-ai-vector-search.md) — Vector Search (Series 6.5)
486487

487488
---

blogs/series-6-ai-app-features/6.4-angular-ai-nl-search.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ This article is part of the **AngularNetTutorial** series. The full-stack tutori
3131
* **Article 6.1 complete**`POST /api/v1/ai/chat` endpoint working
3232
* **Article 6.2 complete**`POST /api/v1/ai/hr-insight` endpoint working
3333
* **Article 6.3 complete** — AI submenu in place, `ai-nl-search` component scaffolded, `AiService` with `nlEmployeeSearch()` method
34-
* **Article 6.5 (.NET) complete**`POST /api/v1/ai/nl-employee-search` endpoint working (the backend for this feature)
34+
* **Article 6.4.1 (.NET) complete**`POST /api/v1/ai/nl-employee-search` endpoint working (the backend for this feature)
3535
* **`AiEnabled: true`** in the API's `appsettings.json` for local testing
3636

37-
> **Note:** The .NET endpoint for natural language employee search is documented in Article 6.5. If you are following this article first (to understand the Angular side), you can still build and run the component — it will show an error until the API endpoint exists.
37+
> **Note:** The .NET endpoint for natural language employee search is documented in Article 6.4.1. If you are following this article first (to understand the Angular side), you can still build and run the component — it will show an error until the API endpoint exists.
3838
3939
---
4040

blogs/series-6-ai-app-features/6.5-dotnet-natural-language-search.md renamed to blogs/series-6-ai-app-features/6.4.1-dotnet-natural-language-search.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -747,9 +747,9 @@ Using an LLM as a **query translator** — input: natural language, output: stru
747747
* [Building Modern Web Applications with Angular, .NET, and OAuth 2.0](https://medium.com/scrum-and-coke/building-modern-web-applications-with-angular-net-and-oauth-2-0-complete-tutorial-series-7ea97ed3fc56) — Main tutorial
748748
* [Run a Local LLM in Your .NET 10 API with Ollama](6.1-dotnet-ai-foundation.md) — AI Foundation (Series 6.1)
749749
* [Build an HR AI Assistant That Knows Your Data](6.2-dotnet-ai-hr-assistant.md) — HR AI Assistant (Series 6.2)
750-
* [Add an AI Chat Widget to Angular with Material Design](6.3-angular-ai-chat-widget.md) — AI Chat Widget (Series 6.3)
751-
* [AI-Generated Dashboard Insights in Angular Material](6.4-angular-ai-dashboard-insights.md)Dashboard Insights (Series 6.4)
752-
* **This Article** — Natural Language Employee Search with LLM Query Parsing (Series 6.5)
750+
* [Build a Dedicated AI Section in Angular with Submenu Navigation](6.3-angular-ai-chat-widget.md) — AI Submenu (Series 6.3)
751+
* [Natural Language Employee Search in Angular Material](6.4-angular-ai-nl-search.md)NL Search Angular (Series 6.4)
752+
* **This Article** — Natural Language Employee Search with LLM Query Parsing (Series 6.4.1 — .NET backend for 6.4)
753753
* [Cache Your AI Responses: Save Time and API Costs](6.6-dotnet-ai-response-caching.md) — AI Response Caching (Series 6.6)
754754

755755
---

0 commit comments

Comments
 (0)