InAppBrowser Insert CSS by File not Working


#1

Good afternoon,
I’m making an InAppBrowser in my app and i want to add CSS to it by a file in the project. So, I made this code:

let browser = new InAppBrowser(‘http://usefashion.com/’, ‘_blank’, ‘location=no, zoom=no’);
browser.on(‘loadstart’).subscribe((e)=>{
console.log(‘Carregando nova página.’);
});
browser.on(‘loadstop’).subscribe((e)=>{
console.log(‘Página carregada.’);
browser.insertCss({
file: ‘assets/portalstyles.css’
}).then((e)=>{ console.log(‘CSS adicionado.’); }).catch((e)=>{ console.log('Erro ao adicionar CSS. '+e); });
});

Although, the file are’t added to page and in console I’m getting this message:

TypeError: Cannot read property ‘apply’ of undefined

Can somebody help me? And how to show a loading message while the page is loading?

Thks, Lucas.


On iOS Devices, First Tap is Not Registering, After Closing a Modal Screen or Opening / Closing the Side Menu
Integrate pixijs - typescript in Ionic 2 with npm
How to separate one click event from another?