Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: What is a service in Angular?
Answer: In Angular, a service is a singleton object that performs tasks like fetching data, sharing data between components, or encapsulating business logic. Services are used to promote reusability and maintainability.

Example:

import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root',
})
export class DataService { }
Is it helpful? Yes No

Most helpful rated by users:

©2026 WithoutBook