I am trying to create a PDF viewer in Angular but when passing it the variable gives error. Can you give me a hand, please?
HTML:
<embed [src]="selectedFile" class="p-col-12" style="height: 800px;">
TS:
private pathFiles = [
'src/assets/pdf/test.pdf',
'src/assets/pdf/test2.pdf',
'src/assets/pdf/test3.pdf',
];
constructor() {
public selectedFile = this.pathFiles[0];
}
Thanks. Greetings!