RC0: TypeScript 'private' vs. 'public' keyword

Only member functions and variables that are used in the HTML template need to be made public. The rest can remain private. You also must make any variables declared via @Input or @Output or @ViewChild public. The good news is that if you forget to make any of these public, when you run npm run build in the home directory of a project based on a stock project started with ionic start --v2 then you will get a compiler complaint about the variable being private and you can change those one by one until all your complaints go away.

5 Likes