Commit 4aa92b4c authored by Emiliano Balbuena's avatar Emiliano Balbuena

(wip): Use value at instantiation time; fix test

1 merge request!761WIP: Fix email confirmation on SSR
Pipeline #114987899 running with stages
......@@ -3,9 +3,13 @@ import { isPlatformServer } from '@angular/common';
@Injectable()
export class RequestUrlService {
constructor(
@Inject('REQUEST_URL') @Optional() protected requestUrl: string
) {}
protected requestUrl: string;
constructor(@Inject('REQUEST_URL') @Optional() requestUrl: string) {
this.requestUrl = isPlatformServer(PLATFORM_ID)
? requestUrl
: window.location.toString();
}
get() {
console.log({
......@@ -13,8 +17,6 @@ export class RequestUrlService {
requestUrl: this.requestUrl,
});
return isPlatformServer(PLATFORM_ID)
? this.requestUrl
: window.location.toString();
return this.requestUrl;
}
}
......@@ -109,7 +109,7 @@ describe('ChannelComponent', () => {
{ provide: FeaturesService, useValue: featuresServiceMock },
{ provide: BlockListService, useValue: MockService(BlockListService) },
{ provide: ClientMetaService, useValue: clientMetaServiceMock },
ConfigsService,
{ provide: ConfigsService, useValue: MockService(ConfigsService) },
],
}).compileComponents(); // compile template and css
}));
......
Please register or to comment