Skip to content

Migrate to Angular standalone components + Fixes #269

Open
dominika-zajac wants to merge 7 commits intong-girls:masterfrom
dominika-zajac:master
Open

Migrate to Angular standalone components + Fixes #269
dominika-zajac wants to merge 7 commits intong-girls:masterfrom
dominika-zajac:master

Conversation

@dominika-zajac
Copy link
Copy Markdown

Migrate to Angular Standalone Components

Summary

This PR migrates the entire tutorial — all 17 step-by-step code examples and the accompanying written content — from the legacy NgModule-based architecture to Angular Standalone Components, keeping the project up to date with modern Angular conventions.


What changed

Code examples (examples/0_01examples/0_19)

  • Removed all app.module.ts files.
  • Added app.config.ts with provideRouter / provideHttpClient for standalone bootstrapping.
  • Updated main.ts in every example to use bootstrapApplication instead of platformBrowserDynamic.
  • Added imports array to all components that previously relied on AppModule declarations.
  • Replaced global_styles.css with styles.scss in angular.json across all examples (required for StackBlitz compatibility).
  • Updated tsconfig.json / tsconfig.app.json targets and paths in all examples.
  • Added postcss dependency and regenerated package-lock.json for all examples.

Tutorial text (workshop-todo-list/)

  • Updated narrative and code snippets throughout to explain standalone component patterns instead of NgModule.
  • Fixed Angular @for control flow syntax in code examples.
  • Removed stale OnInit / implements OnInit references that no longer apply.
  • Fixed about/, interface/, and enrich-todo-item chapters that had remaining standalone issues.
  • Updated StackBlitz links to point to the working fork.
  • Refreshed troubleshooting/README.md and installations/stackblitz.md.

Motivation

Angular has been recommending standalone components as the default since v17. The current tutorial uses NgModules, which creates friction for learners following modern Angular documentation. This migration brings the tutorial in line with the Angular team's guidance and removes the need to explain AppModule as a prerequisite.


Testing

  • All 17 StackBlitz examples open and run without errors.
  • Step-by-step code progressions have been verified to be consistent with the tutorial text.

Commits

Hash Description
9be892c Migrate examples to Angular Standalone Components
b2af709 Update tutorial text for Angular standalone components
c521dae Fixes
71018fc Fix @for syntax and remove stale OnInit imports in tutorial text
6500f80 Fix remaining standalone issues: about/ pages, interface, enrich-todo-item
1502aa2 Regenerate lockfiles, add postcss dependency, update StackBlitz links to fork
0588dc7 Fix angular.json: replace global_styles.css with styles.scss for StackBlitz compatibility

Copilot AI added a commit that referenced this pull request Mar 7, 2026
…examples, update StackBlitz links

Co-authored-by: willi84 <6207308+willi84@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant