question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

defaultEncapsulation not working in Ivy

See original GitHub issue

Angular 9.0.0

Description

defaultEncapsulation option in platformBrowserDynamic().bootstrapModule don’t work.

šŸ”¬ Minimal Reproduction

Just minimal CLI project with platformBrowserDynamic().bootstrapModule(AppModule, { defaultEncapsulation: ViewEncapsulation.None }) .catch(err => console.error(err));

šŸŒ Your Environment

Angular CLI: 9.0.1
Node: 13.7.0
OS: linux x64

Angular: 9.0.0
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.1
@angular-devkit/build-angular     0.900.1
@angular-devkit/build-optimizer   0.900.1
@angular-devkit/build-webpack     0.900.1
@angular-devkit/core              9.0.1
@angular-devkit/schematics        9.0.1
@angular/cli                      9.0.1
@ngtools/webpack                  9.0.1
@schematics/angular               9.0.1
@schematics/update                0.900.1
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.41.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
alxhubcommented, Feb 7, 2020

This doesn’t need a reproduction, I know off the top of my head that it doesn’t work anymore. This is due to the JIT compilation via decorators in Ivy, which no longer have any dependency on platformBrowserDynamic.bootstrapModule().

There may be some fix we can put into place here.

2reactions
pkozlowski-opensourcecommented, Feb 7, 2020

@xuxicheta could you provide a bit more info before we investigate? When you say ā€œdon’t workā€, what do you mean, exactly:

  • errors are thrown during compilation / runtime?
  • specified encapsulation is not applied?
  • something else?

Also, what is the exact CLI command that leads to troubles?

Read more comments on GitHub >

github_iconTop Results From Across the Web

DefaultEncapsulation in angular-cli --prod - Stack Overflow
I've created a basic application using angular-cli command ng new MyProject and to disable view encapsulation globally I changed main.tsĀ ...
Read more >
What's new with Angular 9? - AnAr Solutions Pvt. Ltd.
Ivy renderer being the default in Angular 9, no need to set enableIvy in the tsconfig.json; Work faster with lesser instructions required forĀ ......
Read more >
CompilerOptions - Angular
Note: the useJit and missingTranslation config options are not used in Ivy, passing them has no effect. Those config options are deprecated since...
Read more >
interface.ng2component - UI-Router
ViewEncapsulation.ShadowDom : Use Shadow DOM v1 to encapsulate styles. If not supplied, the value is taken from CompilerOptions . The default compiler option...
Read more >
Practice Exam 2 - NETI 100 • Ivy Tech Community College - Chegg
Exchange is not considered a stable neighbor state. In the loading state, the routers exchange LSUs that contain LSAs. Loading is not considered...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found