Ngx-chips: AoT complains about private properties in the components

Created on 3 Mar 2017  路  12Comments  路  Source: Gbuomprisco/ngx-chips

I got a lot of angular2 compiler errors talking about accessing private properties.

src/static/js/app/ngfactory/node_modules/ng2-tag-input/dist/modules/components/tag-input.ngfactory.ts (215,20): Property 'inputId' is private and only accessible within class 'TagInputComponent'.)
src/static/js/app/ngfactory/node_modules/ng2-tag-input/dist/modules/components/tag-input.ngfactory.ts (222,20): Property 'inputClass' is private and only accessible within class 'TagInputComponent'.)
src/static/js/app/ngfactory/node_modules/ng2-tag-input/dist/modules/components/tag-input.ngfactory.ts (229,20): Property 'clearOnBlur' is private and only accessible within class 'TagInputComponent'.)
.....

It seems some elements in component template are binding to private methods, which violates
Inputs, Outputs, View or Content Child(ren), Hostbindings, and any field you use from the template or annotate for Angular should be public.

screenshot:
image

In addition, in TagInputComponent, it's missing handleKeyPress() method, which is binding to tag-input-form

bug

Most helpful comment

It works perfectly now.
Thank you :)

All 12 comments

Hi @khuang-va,

Thanks for reporting. Could you check version 0.8.8? Thanks!

Still not working.
I too had same problem. Was in a bit of a rush so I hotfixed it ng2-tag-input-fix fork (very fast, very dirty).
But I'd prefer it fixed on this package.

Thanks.

Hey @Gbuomprisco,

Thank you for your reply. I still got some private property errors.

image

Hi guys,

this was fixed by a contributor. Can you still reproduce? Thanks

I still get errors because of ng2-material-dropdown dependency.

Published. Fingers crossed now!

Hi, thanks for quick action and reply.

There is still one more issue:
Property 'scrollListener' is private and only accessible within class 'TagInputDropdown'

It appears that problem is from ng2-tag-input
From tag-input-dropdown.component.ts file:
private scrollListener(): void{ ..

/src/static/js/app/ngfactory/node_modules/ng2-tag-input/dist/modules/components/dropdown/tag-input-dropdown.component.ngfactory.ts (160,48): Property 'scrollListener' is private and only accessible within class 'TagInputDropdown'.)

This is the only thing complaining by compiler now. 馃槅

Should be published now 馃憤

It works perfectly now.
Thank you :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

neilharding picture neilharding  路  5Comments

lukas-bernert picture lukas-bernert  路  4Comments

Gbuomprisco picture Gbuomprisco  路  4Comments

sivamamidi-REISys picture sivamamidi-REISys  路  3Comments

MrBra1nwash picture MrBra1nwash  路  4Comments