For the new Radiology UI, we are using angular 2. I scaffolded the project using angular cli and I have added a couple of components and all this while I have been using the development server embedded with angular cli just by running ng serve. But now I want deploy it as an owa. And according to docs here Open Web Apps Module - Documentation - OpenMRS Wiki the single required file that is needed for this is the manifest.webapp. I have added one and built my project using ng build
and it generated a /dist directory the directory structure is as follows
if I take that directory and just deploy it to a webserver it runs fine and my UI works as expected. Now deploying to openmrs as an owa is giving me issues.
First I renamed the directory to radiology and also packaged it into a .zip file. When deploy the owa, the owa module is able to read my manifest.webapp fine because on the dashboard it properly displays the icon and app name as specified in the manifest.webapp. But when I click on the app I get a blank page. Looking at the console I see a lot of 404 to some javascript files needed for angular.
but if you expand the folder all these files are present int he root directory. Not sure why I’m getting 404 here. It worked fine when I deployed it directly to a web server like a normal web application but breaks when I try to deploy it as an owa.
Platform version 2.0.5 by SDK OWA module version 1.7.0 Legacy UI module version 1.3.1 @angular/cli: 1.2.0