Skip to content

Default project for ng add #10327

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
cyrilletuzi opened this issue Apr 13, 2018 · 8 comments
Closed

Default project for ng add #10327

cyrilletuzi opened this issue Apr 13, 2018 · 8 comments
Labels
P5 The team acknowledges the request but does not plan to address it, it remains open for discussion
Milestone

Comments

@cyrilletuzi
Copy link
Contributor

Versions

cli 6.0.0-rc.4
material 6.0.0-rc.3

Repro steps

  • npm i @angular/cli@next -g
  • ng new helloworld
  • npm install @angular/{material,cdk}@next
  • ng add @angular/material

Observed behavior

Multiple projects are defined; please specify a project name

Desired behavior

Should install in the default project when there is just one.

@clydin
Copy link
Member

clydin commented Apr 13, 2018

There are two projects by default: the app and e2e. Either an option or some heuristics would need to be added to define the default project.

@cyrilletuzi
Copy link
Contributor Author

Oh, OK. Thanks for the info. Closing then.

@clydin
Copy link
Member

clydin commented Apr 13, 2018

I think it is an import usability concern though. So I'd like to keep it open for discussion.

@clydin clydin reopened this Apr 13, 2018
@clydin clydin added the P5 The team acknowledges the request but does not plan to address it, it remains open for discussion label Apr 13, 2018
@clydin clydin added this to the v6.0.0 milestone Apr 13, 2018
@hansl
Copy link
Contributor

hansl commented Apr 13, 2018

ng add does not do anything, this is Material's issue. We just pass the flags to material itself.

We should provide helper functions to read and manage angular.json, but in the meantime everyone's responsible for managing it themselves. Material should support not having a project though.

@hansl hansl closed this as completed Apr 13, 2018
@hansl
Copy link
Contributor

hansl commented Apr 13, 2018

Material will fix this on their side; their issue for reference is angular/components#10833

@cyrilletuzi
Copy link
Contributor Author

For info, there is a similar problem with ng g service-worker, but maybe it is by design.

@keatkeat87
Copy link

ng add @angular/material --project=name
it work.

@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 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P5 The team acknowledges the request but does not plan to address it, it remains open for discussion
Projects
None yet
Development

No branches or pull requests

4 participants