Skip to content

Commit f6418de

Browse files
committed
support for angular-dashboard-framework apply method
1 parent f746582 commit f6418de

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

optionals/angular-dashboard-framework.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,12 @@ module.exports = {
5252
// {resolve: ..}
5353
res.push.apply(res, ctx.matchResolve(props));
5454

55-
// edit: {controller: function(), resolve: {}}
55+
// edit: {controller: function(), resolve: {}, apply: function()}
5656
const edit = ctx.matchProp('edit', props);
5757
if (edit && edit.type === "ObjectExpression") {
5858
const editProps = edit.properties;
5959
res.push(ctx.matchProp('controller', editProps));
60+
res.push(ctx.matchProp('apply', editProps));
6061
res.push.apply(res, ctx.matchResolve(editProps));
6162
}
6263

tests/optionals/angular-dashboard-framework.annotated.js

+3
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ angular.module('myMod', ['adf.provider'])
8383
controller: ["$http", function($http){
8484
// control something
8585
}],
86+
apply: ["$http", "config", function($http, config){
87+
// apply configuration
88+
}],
8689
resolve: {
8790
editone: ["$http", "config", function($http, config){
8891
// resolve something

tests/optionals/angular-dashboard-framework.js

+3
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ angular.module('myMod', ['adf.provider'])
8383
controller: function($http){
8484
// control something
8585
},
86+
apply: function($http, config){
87+
// apply configuration
88+
},
8689
resolve: {
8790
editone: function($http, config){
8891
// resolve something

0 commit comments

Comments
 (0)