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

ViewEncapsulation.Emulated no longer default in alpha38? #4494

Closed
endash opened this issue Oct 3, 2015 · 3 comments
Closed

ViewEncapsulation.Emulated no longer default in alpha38? #4494

endash opened this issue Oct 3, 2015 · 3 comments
Assignees

Comments

@endash
Copy link

endash commented Oct 3, 2015

I've just updated from alpha37 to alpha38, and all my components are now seemingly rendered with the behaviour ViewEncapsulation.None. Manually setting a component's encapsulation to Emulated restores the previous behaviour.

Going through the ng2 source, there no longer seems to be any code to make Emulated the default. In particular, this line:

this.encapsulation = isPresent(encapsulation) ? encapsulation : ViewEncapsulation.Emulated;

formerly of core/render/api, in a block of code that seems to have been moved to core/metadata/view, is no longer present in the same block of code. While that might be a red herring, it does seem that all remaining references to ViewEncapsulation.Emulated are strict comparisons, without any faculty for it to be the fallback.

@tbosch tbosch self-assigned this Oct 5, 2015
tbosch added a commit to tbosch/angular that referenced this issue Oct 5, 2015
@tbosch tbosch closed this as completed in a9aef8e Oct 5, 2015
@tbosch
Copy link
Contributor

tbosch commented Oct 5, 2015

Thanks.
Yes, ViewEncapsulation.Emulated should be the default!

On Sat, Oct 3, 2015 at 6:24 AM Christopher Swasey notifications@github.com
wrote:

I've just updated from alpha37 to alpha38, and all my components are now
seemingly rendered with the behaviour ViewEncapsulation.None. Manually
setting a component's encapsulation to Emulated restores the previous
behaviour.

Going through the ng2 source, there no longer seems to be any code to make
Emulated the default. In particular, this line:

this.encapsulation = isPresent(encapsulation) ? encapsulation :
ViewEncapsulation.Emulated;

formerly of 'render/api', in a block of code that seems to have been moved
to metadata/view, is no longer present in any form. While that might be a
red herring, it does seem that all remaining references to
ViewEncapsulation.Emulated are strict comparisons, without any faculty
for it to be the fallback.


Reply to this email directly or view it on GitHub
#4494.

@endash
Copy link
Author

endash commented Oct 5, 2015

Thanks for the fix 👍

@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
None yet
Projects
None yet
Development

No branches or pull requests

2 participants