Skip to content

Standalone Services

Services in standalone apps work the same way, using @Injectable with providedIn or providers arrays.

@Injectable({ providedIn: 'root' })
export class UserService {
// Tree-shakeable singleton
}
// Component-level providers
@Component({
providers: [FeatureService],
standalone: true
})
export class FeatureComponent { }

Standalone doesn’t change how services work — just how they’re provided.”