import {Component, Input, ElementRef} from '@angular/core';
@Component({
selector: 'publishedIn',
template: `
- Published in
-
-
View less
- 5">...
- 5" class="uk-text-right">
View more
`
})
export class PublishedInComponent {
//key is name
@Input() publishedIn: Map;
public showAll: boolean = false;
constructor (private element: ElementRef) {}
ngOnInit() {}
public scroll() {
console.info("scroll into view");
if (typeof document !== 'undefined') {
this.element.nativeElement.scrollIntoView();
}
}
public getKeys( map) {
return Array.from(map.keys());
}
}