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 new --viewEncapsulation Native|None|ShadowDom do nothing #13689

Closed
kekel87 opened this issue Feb 16, 2019 · 3 comments · Fixed by #13690
Closed

ng new --viewEncapsulation Native|None|ShadowDom do nothing #13689

kekel87 opened this issue Feb 16, 2019 · 3 comments · Fixed by #13690
Labels
area: schematics/angular freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Milestone

Comments

@kekel87
Copy link

kekel87 commented Feb 16, 2019

🐞 Bug report

Command (mark with an x)

- [x] new

Description

Hi,
I try to start new project with default viewEncapsulation set to ShadowDom.
According to ng new documentation, i use --viewEncapsulation flag.

But once the project is generated and served, app-root does not have #shadow-root.
I tried all the other encapsulation but I do not see any result.

What is the expected result for this flag?
Set default shematic with "viewEncapsulation": "ShadowDom" in angular.json and generate app.component.ts with encapsulation: ViewEncapsulation.ShadowDom
OR
Add to main.ts :

bootstrapModule(AppModule, {
  defaultEncapsulation: ViewEncapsulation.ShadowDom
})

Currently it does neither of the two.

🔬 Minimal Reproduction

ng new view-test --skip-git --skip-install --viewEncapsulation ShadowDom
or
ng new view-test --skipGit --skipInstall --view-encapsulation Native
or
ng new view-test --skipGit --skipInstall --viewEncapsulation None

🌍 Your Environment

@angular/cli@7.3.1

Windows 10 64bit
@alan-agius4
Copy link
Collaborator

Hi, thanks for reporting this. The problem seems to be that encapsulation Is not being set in the component.

@kekel87
Copy link
Author

kekel87 commented Feb 17, 2019

What is the reason of this choice ? Why we don't set option globally in main.ts ?

@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 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: schematics/angular freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants