argos/dmp-frontend/src/app/shared/components/url-listing/url-listing.component.ts

31 lines
663 B
TypeScript
Raw Normal View History

2018-03-21 14:15:06 +01:00
import { Component, Input } from "@angular/core";
2018-05-14 08:44:35 +02:00
import { UrlListingItem } from "../../../shared/components/url-listing/UrlListingItem";
import { Router } from "@angular/router";
2018-06-05 10:18:01 +02:00
import { UrlUtilities } from "../../../utilities/UrlUtilities";
2018-03-21 14:15:06 +01:00
@Component({
2018-06-05 10:18:01 +02:00
selector: 'app-url-listing',
templateUrl: './url-listing.component.html'
2018-03-21 14:15:06 +01:00
})
export class UrlListingComponent {
2018-06-05 10:18:01 +02:00
@Input()
items: UrlListingItem[];
2018-03-21 14:15:06 +01:00
2018-06-05 10:18:01 +02:00
@Input()
parameters: any
2018-03-21 14:15:06 +01:00
2018-06-05 10:18:01 +02:00
@Input()
urlLimit: number = 3;
2018-05-14 08:44:35 +02:00
2018-06-05 10:18:01 +02:00
constructor(private router: Router, private urlUtilities: UrlUtilities) { }
2018-05-14 08:44:35 +02:00
2018-06-05 10:18:01 +02:00
ngOnInit() {
2018-05-14 08:44:35 +02:00
2018-06-05 10:18:01 +02:00
}
navigate(link: string) {
this.router.navigate([link, this.parameters]);
}
}