Skip to content
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

[Feature Request] Better --module resolution for all generated types #5461

Closed
delasteve opened this issue Mar 17, 2017 · 1 comment · Fixed by #5467
Closed

[Feature Request] Better --module resolution for all generated types #5461

delasteve opened this issue Mar 17, 2017 · 1 comment · Fixed by #5467

Comments

@delasteve
Copy link
Contributor

delasteve commented Mar 17, 2017

Bug Report or Feature Request (mark with an x)

- [x] feature request

Prerequisite

Given a project

ng new test-proj
ng g m foo
ng g m foo/bar

Current functionality.

When a user wants to pair a type with a module, the user has to specify the full path to the module, like so:

ng g s baz --module=foo/foo.module

or

ng g s baz --module=foo/foo.module.ts

Desired functionality.

A user should also be able to enter the following command

ng g s baz --module=foo

Mention any other details that might be useful.

Currently, the CLI will error when it can't find the module with

Module specified does not exist

When given

ng g s baz --module=foo

the CLI should preform the following module resolution

src/app/foo.module.ts
src/app/foo/foo.module.ts
Error: Module specified does not exist

This should not be exclusive to top level directories. This scenario should work as well.

When given

ng g s baz --module=foo/bar

the CLI should preform the following module resolution

src/app/foo/bar.module.ts
src/app/foo/bar/bar.module.ts
Error: Module specified does not exist
delasteve added a commit to delasteve/angular-cli that referenced this issue Mar 17, 2017
delasteve added a commit to delasteve/angular-cli that referenced this issue Mar 17, 2017
delasteve added a commit to delasteve/angular-cli that referenced this issue Mar 17, 2017
delasteve added a commit to delasteve/angular-cli that referenced this issue Mar 17, 2017
delasteve added a commit to delasteve/angular-cli that referenced this issue Mar 18, 2017
delasteve added a commit to delasteve/angular-cli that referenced this issue Mar 18, 2017
delasteve added a commit to delasteve/angular-cli that referenced this issue Mar 30, 2017
delasteve added a commit to delasteve/angular-cli that referenced this issue Mar 30, 2017
dond2clouds pushed a commit to d2clouds/speedray-cli that referenced this issue Apr 23, 2018
@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 6, 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

Successfully merging a pull request may close this issue.

2 participants