Suggest an editImprove this articleRefine the answer for “What does the useValue key do?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**`useValue`** is a provider key that tells Angular to use a specific ready-made value as the dependency, without creating any objects. **Key point:** `useValue` registers a constant or configuration value in DI so Angular supplies it by token.Shown above the full answer for quick recall.Answer (EN)ImageThe `useValue` key tells Angular: > "Use this specific value as the dependency, do not create anything." --- ### Example: ```ts providers: [ { provide: 'API_URL', useValue: 'https://api.example.com' } ] ``` Now, if `'API_URL'` is requested somewhere, Angular simply supplies this string. --- ### How to use it: ```ts constructor(@Inject('API_URL') private apiUrl: string) { console.log(this.apiUrl); // logs: https://api.example.com } ``` --- ### When it is used: - for simple constants (strings, numbers, objects); - for configuration and settings; - to avoid creating a separate service. --- **Summary:** `useValue` is a way to register a **ready-made value** in the DI system so Angular supplies it by token without creating any objects.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.