mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
add and view docments on chat solved
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-document-second-options',
|
||||
templateUrl: './view-document-second-options.page.html',
|
||||
styleUrls: ['./view-document-second-options.page.scss'],
|
||||
})
|
||||
export class ViewDocumentSecondOptionsPage implements OnInit {
|
||||
|
||||
fileUrl: string;
|
||||
filename: string;
|
||||
completeUrl: string
|
||||
trustedUrl: any;
|
||||
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
private sanitazer: DomSanitizer,
|
||||
) {
|
||||
this.fileUrl = this.navParams.get('fileUrl');
|
||||
this.filename = this.navParams.get('filename');
|
||||
this.completeUrl = `/assets/www/pdfjs/web/viewer.html?file=${this.fileUrl}`;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.fileUrl)
|
||||
console.log(this.completeUrl)
|
||||
|
||||
const link: string = this.completeUrl.replace('//pdfjs/web/', '/pdfjs/web/')
|
||||
this.trustedUrl = this.sanitazer.bypassSecurityTrustResourceUrl(link);
|
||||
}
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user