Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

CSS Selector is Missing an _ngcontent attribute #50678

Copy link
Copy link
@HazzMan2409

Description

@HazzMan2409
Issue body actions

Which @angular/* package(s) are the source of the bug?

Don't known / other

Is this a regression?

No

Description

When you have a selector like the following in a component with encapsulated styles input[type="search"] + button there should be an _ngcontent attribute added to the selector that actually runs in the browser (on both elements). For example, input[type="search"][_ngcontent-ng-c2543699087] + button[_ngcontent-ng-c2543699087].

When you run a build the following selector will run input[type=search]+button[_ngcontent-c2543699087]

Note that when you run a serve the correct selector will run.

Please provide a link to a minimal reproduction of the bug

https://github.com/HazzMan2409/ng-attribute-selector-issue

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 16.0.5
Node: 16.18.0
Package Manager: npm 8.19.2
OS: darwin x64

Angular: 16.0.5
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1600.5
@angular-devkit/build-angular   16.0.5
@angular-devkit/core            16.0.5
@angular-devkit/schematics      16.0.5
@schematics/angular             16.0.5
rxjs                            7.8.1
typescript                      5.0.4

Anything else?

No response

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.