[Library | Trunk]: Cite this: Add first option as default selected

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58756 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2020-05-25 11:12:16 +00:00
parent d428f24fa1
commit 7f967dd6a9
1 changed files with 3 additions and 2 deletions

View File

@ -22,7 +22,7 @@ declare var UIkit: any;
[value]="style">{{style}}</mat-option>
</mat-select>
</mat-form-field>
<div *ngIf="selectedStyle!='0'">
<div *ngIf="selectedStyle">
<div id="citation" class="box-content uk-margin-small-top uk-overflow-auto" [innerHTML]=citationText></div>
<button
class="clipboard_btn uk-button uk-button-small uk-button-secondary uk-margin-small-top uk-icon uk-float-right"
@ -39,7 +39,7 @@ declare var UIkit: any;
})
export class CiteThisComponent implements OnInit, OnDestroy {
private sub: any;
public selectedStyle: string = "0";
public selectedStyle: string = null;
public citationText: string;
public citation: Citation = new Citation();
// public cite: any;
@ -55,6 +55,7 @@ export class CiteThisComponent implements OnInit, OnDestroy {
// this.citeproc = require('./citeproc.js');
// console.log(this.citeproc);
this.parseData();
this.selectedStyle = this.citation.templates[0];
this.updateCitation();
this.createClipboard();
}