We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9a21af1 + 514d492 commit 79e7e22Copy full SHA for 79e7e22
README.md
@@ -594,6 +594,22 @@
594
console.log(myService); // MyService
595
}
596
597
+
598
+ // Angular v18 and above
599
600
+ import { Component, inject } from '@angular/core';
601
+ import { MyService } from './my-service';
602
603
+ @Component({
604
+ selector: 'my-component',
605
+ template: '<div>Parameter decorator</div>'
606
+ })
607
+ export class MyComponent {
608
+ myService: MyService = inject(MyService)
609
+ constructor() {
610
+ console.log(myService); // MyService
611
+ }
612
613
```
614
**[⬆ Back to Top](#table-of-contents)**
615
0 commit comments