Put in order · Angular course · Module 5: Services and DI
Constructor injection step by step
Order the lines of a component that injects a service via the constructor (the classic way):
Items to put in order
- @Component({ selector: 'app-forge', standalone: true })
- import { Component } from '@angular/core';
- export class ForgeComponent {
- constructor(private katanaService: KatanaService) {}
You can check the correct answer by solving this task in the CodeWorlds game.