How to render an html inside the cordova folder in Quasar
I am new to Quasar (and Vue) and I am trying to build a web server that runs on Android using the Quasar framework. I had asked a previous question in this forum and I was told that its better to investigate how to do this type of a solution in Cordova. This was quite helpful and I found a cordova add-on that does the job. The add on is - CorHttpd: embeded httpd for cordova https://github.com/floatinghotpot/cordova-httpd
The addon uses an html page under … to help users start or stop the webserver [Screenshot 1]
So, when I run cordova run android from inside the \src-cordova folder the solution works [Screenshot 1 and 2]
But when I try to compile it using quasar cli - quasar dev -m cordova -T android - I get different types of errors. I think it all boils down to the fact that I dont know how to **call/display ** the addon using Vue/Quasar. Is there any guide on how to do this? How can I render the contents of this html file as a Vue file?
I reviewed the examples given in the Quasar page for Cordova addons but I did not understand how for this particular addon I could use the same approach.
dobbel last edited by dobbel
How can I render the contents of this html file as a Vue file?
You can use the
You can use the
Or you can use Vue.compile() ( second post):
But I don’t think you need to render html in Vue components to be able to use this plugin.( just use the api of the plugin)
I think it all boils down to the fact that I dont know how to **call/display ** the addon using Vue/Quasar.
I think the cordova-httpd cordova plugin can be found somewhere in the browser
window.cordova.plugins.CorHttpdBut I am not sure , best to inspect the app with chrome devtools to see where it is hanging out.
I did find some other webserver plugins:
capacitor( probably the best maintained)
BTW: If you need more support please provide relevant code listings and error logs, so we can help you better.