When I explicitly set an access specifier for a constructor parameter, it becomes visible outside the constructor. For example:
constructor(private employeResourceService:EmployeeResourceService ){
//code}
ngOnInit(){
this.employeResourceService=undefined;//possible
}
However, when I remove the access specifier, constructor parameters are not visible outside the constructor. For example:
constructor(employeResourceService:EmployeeResourceService ){
//code}
ngOnInit(){
this.employeResourceService=undefined;//not visible
}
Why does this happen? Does TypeScript lack a default access specifier like Java?