Modifying local html file for webview


#1

Hello,

How can I reference a local html file I use for the WebView inside a typescript file ? How to modify its content then ?


#2

If you want to modify HTML content then write it to documents / temp directory at run time. Simply reference the file path to src property of web view.


#3

@manojdcoder thank you for the response. I used nativescript filesystem, to get currentApp() folder, then getFile() the wanted html. Using readText() then writeText() with , I was able to modify it the way I wanted. I had to referenced to webview and call reload() method after modifications.