-
Notifications
You must be signed in to change notification settings - Fork 12k
docs(ng-add): docs don't mention that the library will be installed in the project of the CWD #15348
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
@Splaktar I investigated this and it looks like we are not doing anything magical for retrieving the project name. We leverage the CLI's Problem is that the So I think this is actually a CLI issue and it might be best to move that over? thoughts? angular-cli/packages/angular/cli/models/schematic-command.ts Lines 271 to 294 in d0f2cc3
|
Yeah, that code doesn't seem to match up with docs that I linked above. @alan-agius4 is this a CLI docs issue (and should be transferred to angular/angular) or a CLI issue (and go to angular/angular-cli)? |
@Splaktar, what @devversion explained is correct and we use the current working directory to determine the project. Hence what you are seeing is the expected behaviour. The docs highlighted above needs to be fixed, these docs are in the CLI repo, so probably makes sense to transfer this to the CLI. I don’t seem to have permissions to transfer issues from the components repo. |
@alan-agius4 thank you for the clarification! |
@jbogarthyde the following, from the ng add docs needs to be changed
to something like:
|
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. |
Reproduction
Steps to reproduce:
ng new tmp
and respond to promptscd tmp/
ng g app web-app
and respond to promptsangular.json
) to change"defaultProject": "tmp"
to"defaultProject": "web-app"
ng add @angular/material
and respond to promptsExpected Behavior
The
ng add
docs stateThus it is expected to add Angular Material to the default project,
web-app
.Actual Behavior
As you can see, it configured the initial app project in the workspace (
"tmp"
) for Angular Material instead of the default project ("web-app"
).Environment
Ran into this while reviewing PR angular/components#16654.
The text was updated successfully, but these errors were encountered: