import {Component, Input, ElementRef} from '@angular/core';
@Component({
selector: 'availableOn',
template: `
- Available on
-
5">...
`
})
export class AvailableOnComponent {
@Input() availableOn: { "downloadName": string, "downloadUrl": string[],
"collectedName": string, "collectedId": string,
"accessMode": string[], "bestAccessMode": string,
"type": string, "year":string }[];
public threshold: number = 5;
public showNum: number = 5;
constructor (private element: ElementRef) {}
ngOnInit() {}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}
}
}