I have developed a service in typescript as a Class. Within this class, I have defined a static Factory where dependencies are injected.
However, when I compress my application, the dependencies get compressed too, leading to an undefined provider error.
This is how my service looks like:
export class TInterceptor {
public static $inject = ['$q', '$rootScope'];
public static Factory($q:ng.IQService, $rootScope:ng.IRootScopeService)
{
return new TInterceptor($q, $rootScope);
}
constructor(private $q:ng.IQService, private $rootScope:ng.IRootScopeService){}...}
The service is called here:
angular
.module('t')
.config(config);
function config($httpProvider:ng.IHttpProvider)
{
$httpProvider.interceptors.push(TInterceptor.Factory);
}
My concern is, how can I ensure that the dependencies remain protected from getting overwritten during code compression?