Avatar ·

Error "Can't resolve all parameters for component" when injecting a service in Angular

Hi everyone! I'm new to Angular and TypeScript, and I'm having an issue with injecting a service into a component. I created a simple service for working with user data, but when I try to use it, I get the following error:\n\n```\nEXCEPTION: Can't resolve all parameters for UserListComponent: (?).\nMake sure that all the parameters are decorated with Inject or have valid type annotations and that 'UserListComponent' is decorated with Injectable.\n```\n\nHere is my code:\n\n**user.service.ts:**\n```typescript\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class UserService {\n private users = ['Alice', 'Bob', 'Charlie'];\n\n getUsers(): string[] {\n return this.users;\n }\n}\n```\n\n**user-list.component.ts:**\n```typescript\nimport { Component } from '@angular/core';\nimp