I am learning Angular2
and working with classes
in javascript
first time.
What does the private
parameter and why
private will scope this variable for this class (function). public will allow access from outside, if you have the instance of this class. protected is important for properties inside a abstract super class. As i started with Typescript, playground on the TypeScript page (https://www.typescriptlang.org/play/index.html) helped me to understand what really happend. Keep in mind, that TypeScript is sugar for your JavaScript