Skip to content

ViewEncapsulation.Emulated no longer default in alpha38? #4494

Closed

Description

@endash

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.

Activity

  1. self-assigned this
    on Oct 5, 2015
  2. added a commit that references this issue on Oct 5, 2015
    cea598e
  3. tbosch commented on Oct 5, 2015

    @tbosch
    Contributor

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

    On Sat, Oct 3, 2015 at 6:24 AM Christopher Swasey [email protected]
    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.

  4. endash commented on Oct 5, 2015

    @endash
    Author

    Thanks for the fix 👍

  5. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    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.

  6. locked and limited conversation to collaborators on Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions