-
Notifications
You must be signed in to change notification settings - Fork 12k
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
More help with providing services #3371
More help with providing services #3371
Comments
+1 |
+1 - clambered around why this wasn't working from the CLI turns out it was me moving files around and not receiving correct warnings, but this pointed me right at what I was missing. So no googling would have been required. |
This could also be used when generating services: #3806 |
For services, I was thinking maybe a
|
For now I'm content with the warning showing when no additional config is provided and allowing the path of a module to be specified. Providing to a component is an approach that can be manually taken after viewing the provided warning. |
When generating a service you can now specify where it will be provided with this PR #3811 |
ng g s services/apiservices --module=app.module |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
OS?
Mac OSX Sierra
Versions.
angular-cli: 1.0.0-beta.21
node: 6.9.1
os: darwin x64
Repro steps
Suggestion
A warning message is shown that says
WARNING Service is generated but not provided, it must be provided to be used
Perhaps we can extend this to say
WARNING Service is generated but not provided, it must be provided to be used. Consider providing it in the closest NgModule [put module name here]. Read this link for more information about where to provide services [link to docs]
Details
I think not providing the service is correct behavior for the CLI because it is not clear cut. But adding suggestions and/or a link to docs may help the user.
The text was updated successfully, but these errors were encountered: