Skip to content

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

Closed

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.

Activity

  1. silentHoo commented on Sep 28, 2016

    @silentHoo

    It seems to be broken since 2.0.0-final. With RC's before it worked.

    Please see #11595 too which may be the better option for the future.

  2. vicb commented on Sep 28, 2016

    @vicb
    Contributor

    obsolete - old router

  3. angular-automatic-lock-bot commented on Sep 10, 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.

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

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions