Angular module declarations mangled when UI Designer creates <script> statement for custom widget

Description

The UI Designer / Widget Editor also will jumble the Angular Module declarations in the created widget header, which then will appear in the Widget Editor when the widget is edited.

For example, I enter this in Required angular modules:

"angular.module('ui.bootstrap.demo', ['ngAnimate', 'ui.bootstrap'])",

then upon preview the browser throws:

"Uncaught SyntaxError: missing ) after argument list" ,

which shows this:

<script>
angular.module('bonitasoft.ui').requires.push('['ngAnimate'', ''ui.bootstrap'])', 'angular.module('ui.bootstrap.demo'');
</script>

and when I re-open the widget editor, I see this:

['ngAnimate', 'ui.bootstrap']), angular.module('ui.bootstrap.demo'

Environment

Win10
Both current versions of Chrome, Firefox

External Link

None

Workaround

None

Activity

Show:
Benjamin Parisel
November 4, 2019, 2:34 PM
Edited

Hi

You can try to put directly your 'Required angular module'. For example, in your step to reproduce, just add dxin this fields.

You can required multiple modules with this fields. To do this, just separated your module with comma like this: ngAnimate, ui.bootstrap.

Don’t forget to import your angular module’s with widget assets if they are not exist.

Regards

Benjamin

edward geyh
November 7, 2019, 12:24 PM

Benjamin,

First, thank you for your time in this matter.

Second, I am torn between chagrin and embarrassment, and frustration with
documentation. While the docs carousel example says to declare the
module, and tooltip in editor says enter a comma separated list - both of
which are clear statements, it is not clear to an inexperienced user that
that does not mean to create the full amgular.module statement, that the
tool will do that for you.

I will however, default to the former and apologize for taking peoples time
for this trivial matter.

In closing, I would like to say that the more I learn about the tool in
its entirety, the more impressed I am.

Thank you.

Edward Geyh
Providence, RI, USA

Assignee

Unassigned

Reporter

edward geyh

Affects versions

Reference

None

Fix versions

Configure