Skip to content

Bug: generating services with PascalCase name results in errors #350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
silhouette opened this issue Mar 26, 2016 · 2 comments
Closed

Bug: generating services with PascalCase name results in errors #350

silhouette opened this issue Mar 26, 2016 · 2 comments
Assignees

Comments

@silhouette
Copy link

Working under Ubuntu 14.04 with node 5.9.1, npm 3.8.3, angular-cli 0.0.27.

When I generate an app with ng new MyProject, change to the project folder and then add a service via:

ng g service TestService

a build fails afterwards, as the service in the spec file is incorrectly referenced as test-service. When I fix this, the build succeeds, but "ng test" fails with the following message:

WARN [web-server]: 404: /base/dist/app/services/TestService
Chrome 49.0.2623 (Linux 0.0.0) ERROR
Error: XHR error (404 Not Found) loading .../dist/app/services/TestService
at error (.../node_modules/systemjs/dist/system.src.js:1026:16)
at XMLHttpRequest.xhr.onreadystatechange as _onreadystatechange
at ZoneDelegate.invokeTask (.../node_modules/angular2/bundles/angular2-polyfills.js:355:38)
at Zone.runTask (.../node_modules/angular2/bundles/angular2-polyfills.js:254:48)
at XMLHttpRequest.ZoneTask.invoke (.../node_modules/angular2/bundles/angular2-polyfills.js:422:34)

When I run the same with

ng g service test-service

everything works like it should.

@Brocco Brocco self-assigned this Mar 27, 2016
@Brocco
Copy link
Contributor

Brocco commented Apr 7, 2016

This was resolved as part of PR #401
The name being used was not of the correct format, it will be available in the next release.

@Brocco Brocco closed this as completed Apr 7, 2016
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants