Skip to content

Can't style component that is inserted by router-outlet with ViewEncapsulation.Emulated #5345

@tandu

Description

@tandu
@Component({
  selector: 'stub',
  template: 'stub'
})
class Stub {}

@Component({
  'selector': 'home',
  style: `
    stub, router-outlet + * {
      color: red;
    }
  `,
  template: 'Welcome to Home!<router-outlet></router-outlet>'
})
@RouteConfig([
  { path: '/', component: Stub }
])
export class Home {}

I understand it so that components that are added asynchronously don't get _ng_content-<id> attribute being assigned to them. It looks like a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreIssues related to the framework runtimeeffort2: daysfeatureLabel used to distinguish feature request from other issues

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions