Avatar ·

Error "Can't resolve all parameters for component" al inyectar un servicio en Angular

¡Hola a todos! Soy nuevo en Angular y TypeScript, y tengo un problema con la inyección de un servicio en un componente. Creé un servicio simple para trabajar con datos de usuarios, pero al intentar usarlo recibo el siguiente 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\nAquí está mi código:\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