What is @Injectable Decorator?
You must apply the @Injectable decorator if you are defining a class that will be instantiated using the Angular dependency injection feature and that class’s constructor has its own dependencies. I didn’t need to apply this decorator to the Repository class
...
@Injectable()
export class Repository {
...
As Angular resolves the dependencies to create a new object, the @Injectable decorator indicates that it needs to resolve the constructor parameters. If you forget to apply the @Injectable decorator, the application will compile but won’t run, and you will see an error like this in the browser’s JavaScript console:
Error: Can't resolve all parameters for MyClass