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

27 lines
599 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-03-21 14:15:06 +01:00
@Component({
selector: 'app-url-listing',
templateUrl: './url-listing.component.html'
})
export class UrlListingComponent {
@Input()
items: UrlListingItem[];
@Input()
urlLimit: number = 3;
2018-05-14 08:44:35 +02:00
constructor(private router: Router) { }
2018-03-21 14:15:06 +01:00
ngOnInit() {
2018-05-14 08:44:35 +02:00
2018-03-21 14:15:06 +01:00
console.log(this.items.length > this.urlLimit)
}
2018-05-14 08:44:35 +02:00
navigate(link: string) {
this.router.navigateByUrl(link);
}
2018-03-21 14:15:06 +01:00
}