import { Component, OnInit } from '@angular/core'; import { Platform, AlertController, ToastController } from '@ionic/angular'; import { Router, ActivatedRoute } from '@angular/router'; import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx'; @Component({ selector: 'app-ws', providers: [FileOpener], templateUrl: 'ws.page.html', styleUrls: ['ws.page.scss'] }) export class WsPage { items = []; folder = ''; constructor(private plt: Platform,private alertCtrl: AlertController, private fileOpener: FileOpener, private router: Router, private route: ActivatedRoute, private toastCtrl: ToastController) { } ngOnInit() { this.folder = this.route.snapshot.paramMap.get('folder') || ''; this.loadDocuments(); } loadDocuments() { //this.plt.ready().then(() => { //call the service // }); } }