You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on the official Angular2 documentation, it seems that the standard for naming services is:
UserService, defined in class user.service.ts
If I generate a service using "ng g service user", it creates the correct file (create src/client/app/user.service.ts), but the class itself is named "User" instead of "UserService".
Is this the intention or a bug? Note that when using "ng g service UserService", the class name would be "user-service.service.ts", which doesn't seem nice either.
Activity
Brocco commentedon Apr 26, 2016
Good catch, we will update blueprint to handle this command
to generate this code (whitespace removed for brevity):
chore: update class name for services to have Service suffix
chore: update class name for services to have Service suffix
chore: update class name for services to have Service suffix
chore: update class name for services to have Service suffix (#533)
angular-automatic-lock-bot commentedon Sep 5, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.