angularjs in my module

Hi everyone,

i’m trying to figure out how to use angularjs in a module. for testing purpose, i just created a gsp page where you have a text field. if i type any word , it appears under it. i have the appropriate directive for it to work. now when i use the necessary ui.includejavascript in the page, there is no result but when i use the normal script src=", i get it to work. so i’m assuming there is something i need to add to my module for it to work. i have already added the different dependencies to the module which are uicommons, appframework and uiframework.

thank you.

@marafa u can have a look into how angular is used and configured in the registration module and the coreapps module

thank you for the response @gcliff. i have been through the coreapps and several other modules, specially the allergyui module. my conclusion is that i have to make sure: 1- i add the different dependencies in the module poms files 2- i include the different javascript from uicommons in the gsp file (ui.includeJavascript(“uicommons”, “angular.min.js”) 3- i put the js files in resources\scripts

Despite respecting the aboves i still can’t get it to work.


@marafa add in your module dependency on the uicomms and then include the angular-common.js files that you need in your gsp pages files

@gcliff i have already added the dependency in my module.

Could you share your project on github? @marafa

hello @reagan,

the link :

thank you

@marafa i think the challenge is from the way u have configured your page controllers , you can have a sample look here and incase you want to get more familiar with the uiframework u can check it out here

@gcliff The controllers seem to be okay…But the import of uicommons resources is what was failing.

I have created a PR on github that does what you wanted that you can look at and customize further to you requirements @marafa

1 Like

thank you @gcliff. i will have a look

1 Like

ok @reagan thank you. i will have a test.

hi @reagan. uicommons is finally working. thank you for your time.

1 Like