Skip to content

Prefix is ignored when generating components #7553

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
SebastianSchenk opened this issue Aug 30, 2017 · 5 comments
Closed

Prefix is ignored when generating components #7553

SebastianSchenk opened this issue Aug 30, 2017 · 5 comments
Assignees
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity5: regression type: bug/fix

Comments

@SebastianSchenk
Copy link

SebastianSchenk commented Aug 30, 2017

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.4.0-rc.2
node: 7.4.0
os: darwin x64
@angular/animations: 4.3.6
@angular/common: 4.3.6
@angular/compiler: 4.3.6
@angular/core: 4.3.6
@angular/forms: 4.3.6
@angular/http: 4.3.6
@angular/platform-browser: 4.3.6
@angular/platform-browser-dynamic: 4.3.6
@angular/router: 4.3.6
@angular/cli: 1.4.0-rc.2
@angular/compiler-cli: 4.3.6
@angular/language-service: 4.3.6
typescript: 2.3.4

Repro steps.

ng g new my-app --prefix=my
cd src/app
ng g c test

--> A new component is generated with the selector: app-test

Desired functionality.

The selector should be called my-test

Mention any other details that might be useful.

This is my .angular-cli.json

    {
      "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
      "project": {
        "name": "my-app"
      },
      "apps": [
        {
          "root": "src",
          "outDir": "dist",
          "assets": [
            "assets",
            "favicon.ico"
          ],
          "index": "index.html",
          "main": "main.ts",
          "polyfills": "polyfills.ts",
          "test": "test.ts",
          "tsconfig": "tsconfig.app.json",
          "testTsconfig": "tsconfig.spec.json",
          "prefix": "my",
          "styles": [
            "styles.scss"
          ],
          "scripts": [],
          "environmentSource": "environments/environment.ts",
          "environments": {
            "dev": "environments/environment.ts",
            "prod": "environments/environment.prod.ts"
          }
        }
      ],
      "e2e": {
        "protractor": {
          "config": "./protractor.conf.js"
        }
      },
      "lint": [
        {
          "project": "src/tsconfig.app.json"
        },
        {
          "project": "src/tsconfig.spec.json"
        },
        {
          "project": "e2e/tsconfig.e2e.json"
        }
      ],
      "test": {
        "karma": {
          "config": "./karma.conf.js"
       }
      },
      "defaults": {
        "styleExt": "scss",
        "component": {}
      }
    }
@intellix
Copy link
Contributor

intellix commented Aug 31, 2017

I'm also getting SCSS file config ignored as well. Are you getting CSS or SCSS files generated when you generate a component with RC?

P.S - you can wrap your code in ``` on new lines to give it formatting

@dottodot
Copy link

dottodot commented Sep 2, 2017

I'm seeing the same issue on 1.4.0-rc.2 both app prefix and scss are being ignore and defaulting to app and css.

@filipesilva filipesilva added severity5: regression P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix labels Sep 4, 2017
@filipesilva
Copy link
Contributor

I'll track the styleExt in #7522.

@Brocco
Copy link
Contributor

Brocco commented Sep 5, 2017

Closing as a duplicate of #7522

@Brocco Brocco closed this as completed Sep 5, 2017
@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 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity5: regression type: bug/fix
Projects
None yet
Development

No branches or pull requests

5 participants