Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

Component encapsulation only works with predefined constants #158

Closed
dentra opened this issue Oct 27, 2016 · 4 comments
Closed

Component encapsulation only works with predefined constants #158

dentra opened this issue Oct 27, 2016 · 4 comments
Milestone

Comments

@dentra
Copy link

dentra commented Oct 27, 2016

Using this code does not produces component with native encapsulation:

const ViewEncapsulation myEncapsulation = ViewEncapsulation.Native;

@Component(
    selector: 'test-compo',
    encapsulation: myEncapsulation,
    template: '<h1>test</h1>',
)
class TestComponent {
}

Is this expected behaviour?

@matanlurey
Copy link
Contributor

This is expected behavior because of the naivity of the current component compiler.

It's fixable though, but will is also blocked on #48; I'll keep this open to track. For now, declare it exactly in your definition.

@matanlurey
Copy link
Contributor

This is now planned for the 4.0 release.

@matanlurey
Copy link
Contributor

Blocked by #404.

@matanlurey matanlurey removed the P3 low label Jun 9, 2017
@matanlurey
Copy link
Contributor

This works as of HEAD, though it is not released yet.

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