# \[OWA Generator\] Angular Template Issue

**URL:** <https://talk.openmrs.org/t/owa-generator-angular-template-issue/18204>\
**Category:** Development\
**Tags:** angular, javascript\
**Created:** [May 25, 2018, 4:02pm UTC](https://talk.openmrs.org/t/owa-generator-angular-template-issue/18204 "2018-05-25T16:02:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![isuranga](https://talk.openmrs.org/user_avatar/talk.openmrs.org/isuranga/32/7207_2.png) [@isuranga](https://talk.openmrs.org/u/isuranga)\
**Post date:** [May 25, 2018, 4:02pm UTC](https://talk.openmrs.org/t/owa-generator-angular-template-issue/18204/1 "2018-05-25T16:02:15Z")

</div>

Hi All,

I created an OWA app(Angular) using OWA generator following [this](https://wiki.openmrs.org/display/docs/Open+Web+App+Development+Workflow) wiki page. But when I try to load the module it gives following error on the console. ![image](https://talk.openmrs.org/uploads/default/original/2X/f/f20de8e01a45ba670d02e9c7878820300a41c450.png)

Appreciate any help.

CC : @danfuterman

---

<div class="post-metadata">

**Author:** ![pascal](https://talk.openmrs.org/letter_avatar/pascal/32/5_5575768a8748004e209b776fc1b2916d.png) [@pascal](https://talk.openmrs.org/u/pascal)\
**Post date:** [May 25, 2018, 4:36pm UTC](https://talk.openmrs.org/t/owa-generator-angular-template-issue/18204/2 "2018-05-25T16:36:09Z")

</div>

@isuranga can you link to the repo?

---

<div class="post-metadata">

**Author:** ![isuranga](https://talk.openmrs.org/user_avatar/talk.openmrs.org/isuranga/32/7207_2.png) [@isuranga](https://talk.openmrs.org/u/isuranga)\
**Post date:** [May 25, 2018, 4:37pm UTC](https://talk.openmrs.org/t/owa-generator-angular-template-issue/18204/3 "2018-05-25T16:37:15Z")

</div>

@pascal [https://github.com/IsurangaPerera/openmrs-owa-eventnotifications](https://github.com/IsurangaPerera/openmrs-owa-eventnotifications)

---

<div class="post-metadata">

**Author:** ![pascal](https://talk.openmrs.org/letter_avatar/pascal/32/5_5575768a8748004e209b776fc1b2916d.png) [@pascal](https://talk.openmrs.org/u/pascal)\
**Post date:** [May 25, 2018, 4:52pm UTC](https://talk.openmrs.org/t/owa-generator-angular-template-issue/18204/4 "2018-05-25T16:52:45Z")

</div>

Okay, I can confirm it’s an issue with the Angular template. It’s reproducible by just running `npm test`. It looks like the template hasn’t been updated since Angular v1.5.5, so I guess the code is a little out of date. Do you mind creating a ticket for this issue [here](https://issues.openmrs.org/projects/OMRSJS/issues/OMRSJS-23?filter=allopenissues), and digging around to see what you can find out? It looks like a pretty [common](https://www.google.com/search?q=angular+TypeError%3A+a+is+not+a+function) issue.

---

<div class="post-metadata">

**Author:** ![pascal](https://talk.openmrs.org/letter_avatar/pascal/32/5_5575768a8748004e209b776fc1b2916d.png) [@pascal](https://talk.openmrs.org/u/pascal)\
**Post date:** [May 25, 2018, 5:01pm UTC](https://talk.openmrs.org/t/owa-generator-angular-template-issue/18204/5 "2018-05-25T17:01:30Z")

</div>

Wait, is this code a clean module generated by the generator, or have you added your own code? Also, what version of the generator did you use?

Maybe @ankitkumar has some ideas?

---

<div class="post-metadata">

**Author:** ![danfuterman](https://talk.openmrs.org/user_avatar/talk.openmrs.org/danfuterman/32/10800_2.png) [@danfuterman](https://talk.openmrs.org/u/danfuterman)\
**Post date:** [May 28, 2018, 6:22am UTC](https://talk.openmrs.org/t/owa-generator-angular-template-issue/18204/6 "2018-05-28T06:22:03Z")

</div>

Thanks @pascal!

@isuranga - can you confirm if you still need support on this, and if you can provide @pascal with the relevant info? I tried to have a look at the [module repo](https://github.com/IsurangaPerera/openmrs-owa-eventnotifications) you linked to, but it seems to be a dead link.

As an aside, since you mentioned you’d like to use React for the module frontend, you might want to also take a look at the following:

- [Creating OWA Open Web Apps in Bahmni](https://bahmni.atlassian.net/wiki/spaces/BAH/pages/506986565/Creating+OWA+Open+Web+Apps+in+Bahmni)
- [React OpenMRS admin OWA app boilerplate](https://github.com/sanishmaharjan/boilerplate-react-owa) (which was put together by those working on the [Bed Management Module](https://github.com/openmrs/openmrs-module-bedmanagement/tree/master/owa))

But remember, you should be building the frontend to fit in with the Bahmni admin UI, rather than the OpenMRS RefApp or OpenMRS legacy UI. And you may want to consider packaging the OWA together with the backend in an OpenMRS module, such as is done with the [bed management module](https://github.com/openmrs/openmrs-module-bedmanagement).

---

<div class="post-metadata">

**Author:** ![isuranga](https://talk.openmrs.org/user_avatar/talk.openmrs.org/isuranga/32/7207_2.png) [@isuranga](https://talk.openmrs.org/u/isuranga)\
**Post date:** [May 28, 2018, 6:52am UTC](https://talk.openmrs.org/t/owa-generator-angular-template-issue/18204/7 "2018-05-28T06:52:42Z")

</div>

Thanks @pascal @danfutermanSorry for the late response. I’ve removed the repo since I’m going to use React + Redux for the module frontend
