← Blog

πŸ”§ Angular 22 Is Phasing Out @Injectable; The New @service() Decorator Is Here

πŸ”§ Angular 22 Is Phasing Out @Injectable; The New @service() Decorator Is Here
Photo by Karolina Grabowska from Pexels

What this article is about

Angular 22 introduces the @service() decorator as a simpler replacement for @Injectable(). This article covers what the new decorator does, how it differs from the old approach, and whether you should migrate your existing services. It also covers template comments, another new feature landing in version 22.

Hi, my name is Tom Smykowski, I'm a staff full-stack engineer. I build and scale SaaS platforms to millions of users, working end-to-end from system architecture to frontend to mobile. On this blog I share Angular updates and framework evolution insights.

Questions this article answers

  • What does the new @service() decorator do in Angular 22?
  • How is @service() different from @Injectable()?
  • What is the autoProvided property and when would you use it?
  • Can you add comments inside HTML element tags in Angular templates now?
  • Should you migrate existing services to the new decorator?

Article size and reading time

This article is approximately 1,200 words and takes about 5 minutes to read. It includes code examples for both the old and new decorator syntax, plus a look at the new template comment feature.

This article is free to read

Accept the article license to load the full post. No account or credits required.

Article License (single-reader access) β€” By continuing, you receive a personal, non-transferable, revocable license to access and read this article for your own use.

DO

  • Read and reference the article for personal learning or internal discussion, manually by a human only.
  • Quote short excerpts with attribution and a link to the original article, manually by a human only.
  • Use quotes only when they do not substitute or disclose substantial original parts, manually by a human only.

DON'T

  • Republish, mirror, redistribute, or sell the article in full or in part.
  • Use the article or excerpts as input for AI/ML training, fine-tuning, or datasets.
  • Extract, scrape, summarize, or quote content using bots, scripts, or AI tools.
  • Bypass paywall, licensing, access, or technical protection mechanisms.

Any unlicensed use is prohibited. Breach of these terms automatically terminates this license and may result in access removal and legal enforcement.

Get the newsletter

Posts and notes straight to your inbox

Get new posts and short notes by email β€” no spam, unsubscribe anytime.