My internship defense is on monday and I’m trying to have something to put in my report. For my defense I want to present openmrs offline but I just want to be able to apply offline just for patient registration at the moment. At least something I can demo. I tried using a java module but the way openmrs is architectured makes it almost impossible to register a service worker with the appropriate scope. Now I’ve turned to owa and I’m facing some issues.
I just used the openmrs owa generator to scaffold a simple web app. It has the following directory structure
Inside index.html, I tried including the test.js using
I’m fairly new to the owa generator and the directory structure is a bit strange to me. I could still remove everything and just use bower for dependency management but I want to benefit from the live reload so I’ll like to understand the current architecture more.
I don’t see how libraries are been included in index.html. Say I want to use some javascript library or bootstrap. I know I can install them via npm install bootstrap for example but how do I why use them inside the index.html.
There should be no need to modify index.html. Whenever you want to add a UI element, you do it by implementing a component and adding it to the page. I found this tutorial quite helpful: https://thinkster.io/angularjs-es6-tutorial
How did you create the scaffolding? Did you use openmrs-sdk:create-project? The directory structure doesn’t seem to be up-to-date, which may imply you used an old version of a generator. I’d recommend using SDK, which should always fetch the latest version of a generator.