We are upgrading to Angular 6 from 5. We have a shared library that we are getting build errors. Being a Java shop, we got in the habit of marking our component methods and attributes private. In Angular 6 when building our library (after converting and using the new library CLI capability), we get:
Property 'getCurrentYear' is private and only accessible within class.
In effect any attribute or method used in a template html cannot be marked private anymore on the component class. Of course we can fix this by removing the 'private' modifier. This was not the case in angular 5 when we produced our library using https://github.com/raphael-volt/ng2-testable-lib.
Oddly enough, this ONLY happens when compiling our library. We upgraded an app to angular 6 that also has private attributes and methods on the component / usage in template and no issues there.
Did we find a bug? Is there a best practice we are not adhering to?