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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't initialize Angular Element with a "falsy" element property value #30834
Labels
area: elements
Issues related to Angular Elements
Milestone
Comments
antch
changed the title
Can't initialize Angular Element with a
Can't initialize Angular Element with a "falsy" element property value
Jun 3, 2019
false
element property value
merobal
pushed a commit
to merobal/angular
that referenced
this issue
Jul 17, 2019
14 tasks
merobal
pushed a commit
to merobal/angular
that referenced
this issue
Jul 17, 2019
merobal
pushed a commit
to merobal/angular
that referenced
this issue
Jul 18, 2019
mhevery
pushed a commit
that referenced
this issue
Jul 18, 2019
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this issue
Sep 6, 2019
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
馃悶 bug report
Affected Package
The issue is caused by package @angular/elements
Is this a regression?
No.
Description
When using an Angular Element as a custom element, a component
@Input
cannot be initialized tofalse
(or other falsy value) via setting the element's property value.馃敩 Minimal Reproduction
Stackblitz that shows failure to initialize both "false" (for boolean) and 0 (for number): https://stackblitz.com/edit/angular-elements-test-input-bindings
I debugged this and this
if
condition appears to be causing it (component-factory-strategy.ts#L168):This is treating any "falsy" value as uninitialized, which is incorrect.
馃敟 Exception or Error
There is no error, the boolean
false
input value is not set to the component input.馃實 Your Environment
Angular Version:
The text was updated successfully, but these errors were encountered: