@@ -40,7 +40,8 @@ App_Plugins\MyPlugin\package.manifest
40405 . Inject a bulk action inside the ` umbraco-commerce-bulk-actions-config.js ` by adding the following:
4141
4242``` csharp
43- angular .module ('umbraco.commerce' )
43+ // Define an angular module that has a dependency on `umbraco.commerce`
44+ angular .module ('myModule' , ['umbraco.commerce' ])
4445 .config (['ucActionsProvider' , function (ucActionsProvider ) {
4546 ucActionsProvider .bulkActions .push (['myResource' , function (myResource )
4647 {
@@ -58,6 +59,8 @@ angular.module('umbraco.commerce')
5859 }]);
5960 }]);
6061
62+ // Add your module as a dependency of the main umbraco module
63+ angular .module ('umbraco' ).requires .push ('myModule' );
6164```
6265
6366Once created, the bulk action will be displayed in the bulk actions bar for the configured entities.
@@ -95,7 +98,7 @@ Only an `itemAction` or a `bulkAction` method can be defined for a bulk action c
9598The following section display an example of a bulk action with dialog configuration step:
9699
97100``` csharp
98- angular .module ('umbraco.commerce' )
101+ angular .module ('myModule' , [ ' umbraco.commerce'] )
99102 .config (['ucActionsProvider' , function (ucActionsProvider ) {
100103 ucActionsProvider .bulkActions .push (['$q' , 'editorService' , 'myResource' , function ($q , editorService , myResource )
101104 {
@@ -133,4 +136,5 @@ angular.module('umbraco.commerce')
133136 }]);
134137 }]);
135138
139+ angular .module ('umbraco' ).requires .push ('myModule' );
136140```
0 commit comments