-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Breaking changes in 2.1.4 with NG2.1 #12727
Comments
@brachi-wernick can you share more context? i can not piece together a self-contained repro using your snippets. |
@mhegazy Here's a simple repro: declare var Input: any;
class A {
@Input() set value(value: string) { } // works
get value() { return ""; }
}
class B {
set value(value: string) { }
@Input() get value() { return ""; } // does not work
} It looks like decorators on the second declaration are not emitted. |
@brachi-wernick the fix should be in |
@mhegazy It is working for me with [email protected] @brachi-wernick |
Something interesting is that I get an empty array for the |
@aluanhaddad As getters cannot have parameters, the |
TypeScript Version: 2.1.4 with ng 2.1.x
Code1 failed:
Code2 failed:
Expected behavior:
should work as before upgrade, I can use the value as input in html.
@input can be above a get method or above a set method. and get/set method can appear in the class in each place.
Actual behavior:
get an error:
Can't bind to 'value' since it isn't a known property of 'some-componnet'.
@input must be in the get method, but get method must appears before the set method.
this code works: but for me it is workaround:
Code1 failed:
Code2 failed:
The text was updated successfully, but these errors were encountered: