-
Notifications
You must be signed in to change notification settings - Fork 12k
Cannot generate a component on a dir path other than the default "app/" #12141
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
Comments
We also have this issue, and have the same definition for required functionality. Here is the output of
DetailsIf we try to create a new component, for example However, we do not want all our code to be located in The only way we can avoid this problem is by either execute the generate command from the target folder, or to start our paths with I will open a separate issue for that (if there is none already existing), but when generating components with a relative Moving around in the folders could work, but since we have many components to generate, it will become tedious to constantly navigate to the proper folder before generating said new components. As such, I would expect that the generate command should generate entities relative to the Desired functionalityIf |
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends. Find more details about Angular's feature request process in our documentation. |
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage. We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package. You can find more details about the feature request process in our documentation. |
Duplicate of #9370 |
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. |
From @shairez on March 2, 2018 9:41
Bug Report or Feature Request (mark with an
x
)Area
Versions
Node v8.9.0
Npm 5.6.0
Windows 10
Repro steps
Let's say I have the following structure -
And I want to create a new component under
custom-app
From the root of the project, trying to run any of these :
ng g c my-comp -m="../custom-app/app.module.ts"
or
ng g c custom-app/my-comp -m="../custom-app/app.module.ts"
or even
ng g c /src/custom-app/my-comp -m="../custom-app/app.module.ts"
results in a component being created under the
/app
folder and not/custom-app
.The log given by the failure
Desired functionality
I would expect that -
Specifying a module would create the component underneath that specific module's folder
If not, at least specifying a different path (starting from the
src
folder) will generate that component under that custom pathMention any other details that might be useful
none
Copied from original issue: angular/devkit#476
The text was updated successfully, but these errors were encountered: