It has come to my attention that an angular class fails to recognize an injected service unless it is explicitly defined with scope.
The following code does not function as expected:
constructor(router: Router) {}
However, this code works correctly:
constructor(private router: Router) {}
I am curious as to why this discrepancy exists. I had assumed that without explicit scope definition, properties default to public, similar to class properties. However, it appears this is not the case in this scenario.