Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding property/event bindings to ng-content should error #24259

Open
jelbourn opened this issue Jun 1, 2018 · 1 comment
Open

Adding property/event bindings to ng-content should error #24259

jelbourn opened this issue Jun 1, 2018 · 1 comment

Comments

@jelbourn
Copy link
Member

jelbourn commented Jun 1, 2018

Issue

Adding property/event bindings to <ng-content> (attributes that are not explicitly supported APIs) currently no-op. They should be an error, as the attributes will be completely lost.

Reproduction

https://stackblitz.com/edit/angular-gitter-hm6egs?file=app%2Fapp.component.ts

@vicb vicb changed the title Adding unsupported attributes to ng-content should error Adding property/event bindings to ng-content should error Jun 1, 2018
@vicb
Copy link
Contributor

vicb commented Jun 1, 2018

Adding an attribute could be used for re-projection: <ng-content selector="a[title]" someRandomName></ng-content> and then <ng-content selector="[someRandomName]"></ng-content>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants