Skip to content

Commit abc9fff

Browse files
Update bulk action example code snippts
1 parent 4d5c98d commit abc9fff

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

10/umbraco-commerce/key-concepts/bulk-actions.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ App_Plugins\MyPlugin\package.manifest
4040
5. 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

6366
Once 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
9598
The 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
```

13/umbraco-commerce/key-concepts/bulk-actions.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ App_Plugins\MyPlugin\package.manifest
4040
5. 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

6366
Once 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
9598
The 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

Comments
 (0)