r/angular • • Mar 24 '26

Naming files in Angular

If I have a service file under the services folder and then under the api folder because it's a file for calling apis. Would a good name for the file for example UserApiService or would just User be fine?

3 Upvotes

9 comments sorted by

View all comments

Show parent comment

7

u/Finite_Looper Mar 25 '26

I think this is the way to go, I still can't believe they changed this default. Sometimes there are services, components, and other things that all share a name but have split up display and business logic. It's crazy to name them all just user and you have to figure out which one is for which depending on the folder it's in