Skip to content

Blogpost NG22#84

Draft
fmalcher wants to merge 4 commits intomainfrom
ng22
Draft

Blogpost NG22#84
fmalcher wants to merge 4 commits intomainfrom
ng22

Conversation

@fmalcher
Copy link
Copy Markdown
Member

@fmalcher fmalcher commented Mar 10, 2026

ng g service book-store --injectable
```

Der Decorator `@Injectable()` wird also zunächst nicht abgeschafft, sodass bestehende Anwendungen nicht sofort migriert werden müssen.
Copy link
Copy Markdown
Member

@JohannesHoppe JohannesHoppe May 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Der Decorator `@Injectable()` wird also zunächst nicht abgeschafft, sodass bestehende Anwendungen nicht sofort migriert werden müssen.
Der neue `@Service()` Decorator sieht keine Konfigurationsmöglichkeiten vor, daher wird für spezielle Fälle (etwa `providedIn: 'platform'`) weiterhin `@Injectable()` benötigt.
Wir müssen demzufolge nicht befürchten, dass `@Injectable()` in naher Zukunft "deprecated" wird.

```

Der Decorator `@Injectable()` wird also zunächst nicht abgeschafft, sodass bestehende Anwendungen nicht sofort migriert werden müssen.
Wir empfehlen dennoch, neue Services sofort mit dem neuen Decorator auszustatten.
Copy link
Copy Markdown
Member

@JohannesHoppe JohannesHoppe May 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Wir empfehlen dennoch, neue Services sofort mit dem neuen Decorator auszustatten.
Wir empfehlen dennoch, neue Services mit dem neuen Decorator auszustatten – die Syntax ist kürzer und es sieht auch ein wenig schicker aus.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

em-dash, 100% handgemacht! :D

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.

3 participants