Skip to content
Snippets Groups Projects
Commit b519b50e authored by OZGCloud's avatar OZGCloud
Browse files

OZG-3034 add types

parent 6d9b8f07
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ import { ResourceRedirectLinkRel } from './resource-redirect-linkrel';
@Injectable({ providedIn: 'root' })
export class ResourceRedirectService {
private readonly PARAM_URI_PLACEHOLDER = '{uri}';
private readonly PARAM_URI_PLACEHOLDER: string = '{uri}';
constructor(
private apiRootService: ApiRootService,
......@@ -51,7 +51,7 @@ export class ResourceRedirectService {
navigateToResource(resource: Resource): void {
if (hasLink(resource, ResourceRedirectLinkRel.VORGANG)) {
const vorgangUri: string = toResourceUri(resource, ResourceRedirectLinkRel.VORGANG);
const vorgangUri: ResourceUri = toResourceUri(resource, ResourceRedirectLinkRel.VORGANG);
this.navigationService.navigateToVorgang(vorgangUri);
return;
......
import { ResourceRedirectService } from '@alfa-client/resource-redirect-shared';
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { ResourceUri } from '@ngxp/rest';
@Component({
standalone: true,
template: '',
})
export class ResourceRedirectComponent implements OnInit {
private readonly PARAM_URI = 'uri';
private readonly PARAM_URI: string = 'uri';
constructor(
private route: ActivatedRoute,
......@@ -16,7 +17,7 @@ export class ResourceRedirectComponent implements OnInit {
ngOnInit(): void {
this.route.queryParamMap.subscribe((queryParams) => {
const resourceUri: string = queryParams.get(this.PARAM_URI);
const resourceUri: ResourceUri = queryParams.get(this.PARAM_URI);
if (resourceUri) {
this.resourceRedirectService.redirectToResource(resourceUri);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment