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

DeprecateProperty breaks a property that has no getter/setter defined #3705

Closed
DiyanDimitrov opened this Issue Jan 23, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@DiyanDimitrov
Copy link
Contributor

DiyanDimitrov commented Jan 23, 2019

Description

If you add the DeprecateProperty decorator to an input property without get/set methods, an error is thrown when you try to set the property.

  • igniteui-angular version: 7.1.x, 7.2.x
  • browser: NA

Steps to reproduce

  1. Add a @DeprecateProperty decorator to an input property without getter/setter i.e.:
    @Input('page')
    @DeprecateProperty(`IgxTextHighlightDirective \`page\` property is depracated.`)
    public page: number;
  1. Try to set the property in a template.

Result

An error is thrown in the console:
TypeError: Cannot assign to read only property 'page' of object '[object Object]'

Expected result

No errors should be thrown.

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