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

ng add - please specify a project name #11016

Open
andreasonny83 opened this issue May 25, 2018 · 3 comments
Open

ng add - please specify a project name #11016

andreasonny83 opened this issue May 25, 2018 · 3 comments
Labels
area: angular/cli feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors feature Issue that requests a new feature
Milestone

Comments

@andreasonny83
Copy link

Versions

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 6.0.5
Node: 10.1.0
OS: darwin x64
Angular: 6.0.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.6.5
@angular-devkit/build-angular      0.6.5
@angular-devkit/build-ng-packagr   0.6.5
@angular-devkit/build-optimizer    0.6.5
@angular-devkit/core               0.6.5
@angular-devkit/schematics         0.6.5
@angular/cli                       6.0.5
@angular/material                  6.1.0
@ngtools/json-schema               1.1.0
@ngtools/webpack                   6.0.5
@schematics/angular                0.6.5
@schematics/update                 0.6.5
ng-packagr                         3.0.0-rc.5
rxjs                               6.2.0
typescript                         2.7.2
webpack                            4.8.3

Repro steps

  • Step 1
    starting a new project with ng new angular-project
  • Step 2
    generate a library/application inside the new angular-cli project
    ng g library mylibrary
    ng g application myapp
  • Step 3
    Add @angular/material
    ng add @angular/material myapp
    Installing packages for tooling via npm.
    Multiple projects are defined; please specify a project name
    

Observed behavior

@angular/material gets correclty installed in the node dependencies but the myapp project is not configured for using the library.

Desired behavior

The current ng add usage is: usage: ng add <collection>
Ideally this should allow passing the target app like this:

usage: ng add <collection> [options]
options:
  --project
      The name of the project.
@minuz
Copy link

minuz commented May 27, 2018

I was trying to do the same. If you do ng add @angular/material --project=my-app it "works". What I observed was:

  1. The docs don't specify this parameter.
  2. ng generate @angular/material:material-nav --name=app-nav scaffolds the component on the src\app instead of generating on the default project. You also need to append --project=my-app to set to its correct location.
  3. ng serve --project=demo will serve the correct app
  4. The generated template has a little bug isHandset$ | async needs to be wrapped in ()

@Brocco Brocco added the feature Issue that requests a new feature label Jun 7, 2018
@ngbot ngbot bot added this to the Backlog milestone Jan 24, 2019
@angular-robot angular-robot bot added the feature: votes required Feature request which is currently still in the voting phase label Feb 1, 2022
@angular-robot
Copy link
Contributor

angular-robot bot commented Feb 1, 2022

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.

@ngbot ngbot bot modified the milestones: Backlog, needsTriage Feb 1, 2022
@angular-robot
Copy link
Contributor

angular-robot bot commented Feb 21, 2022

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.

@angular-robot angular-robot bot added feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors and removed feature: votes required Feature request which is currently still in the voting phase labels Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: angular/cli feature: insufficient votes Label to add when the not a sufficient number of votes or comments from unique authors feature Issue that requests a new feature
Projects
None yet
Development

No branches or pull requests

5 participants