0

The app is working/building fine, however it when I try to run ng xi18n --output-path src/translate I get ERROR in Can't resolve all parameters for SomeComponent in /path/some.component.ts: (?, [object Object], [object Object]).

From the error I can assume it's the first parameter in the constructor that's causing the issue, however, my constructor looks like this:

constructor(
        $window: Window,
        service1: Service1,
        service2: Service2
    ) {
        super($window, service1, Service2);
    }

The constructor of the class that is extended looks like this:

constructor(
        protected $window: Window,
        protected service1: Service1,
        protected service2: Service2
    ) {}

It seems that these errors usually come from Injection and or placement in the barrel issues? If so how is window at fault here, or maybe it could be something completely unrelated?

Akif
  • 7,098
  • 7
  • 27
  • 53
Simas
  • 3
  • 3

1 Answers1

0

Seems like the issue was as simple as incorrect injection of Window. Writing a custom service to handle it solved the issue. You can find the correct way of injection here: How to inject window into a service?

Simas
  • 3
  • 3