Skip to content

Default project for ng add #10327

Closed
Closed

Description

@cyrilletuzi

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.

Activity

  1. clydin commented on Apr 13, 2018

    @clydin
    Member

    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.

  2. cyrilletuzi commented on Apr 13, 2018

    @cyrilletuzi
    ContributorAuthor

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

  3. clydin commented on Apr 13, 2018

    @clydin
    Member

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

  4. reopened this on Apr 13, 2018
  5. added
    P5
    on Apr 13, 2018
  6. added this to the v6.0.0 milestone on Apr 13, 2018
  7. hansl commented on Apr 13, 2018

    @hansl
    Contributor

    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.

  8. hansl commented on Apr 13, 2018

    @hansl
    Contributor

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

  9. cyrilletuzi commented on Apr 13, 2018

    @cyrilletuzi
    ContributorAuthor

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

  10. keatkeat87 commented on May 6, 2018

    @keatkeat87

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

  11. angular-automatic-lock-bot commented on Sep 8, 2019

    @angular-automatic-lock-bot

    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.

  12. locked and limited conversation to collaborators on Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P5

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions