mirror of
https://github.com/bluetech/ng-annotate-patched.git
synced 2026-07-02 00:17:42 +08:00
support for angular-dashboard-framework apply method
This commit is contained in:
+2
-1
@@ -52,11 +52,12 @@ module.exports = {
|
||||
// {resolve: ..}
|
||||
res.push.apply(res, ctx.matchResolve(props));
|
||||
|
||||
// edit: {controller: function(), resolve: {}}
|
||||
// edit: {controller: function(), resolve: {}, apply: function()}
|
||||
const edit = ctx.matchProp('edit', props);
|
||||
if (edit && edit.type === "ObjectExpression") {
|
||||
const editProps = edit.properties;
|
||||
res.push(ctx.matchProp('controller', editProps));
|
||||
res.push(ctx.matchProp('apply', editProps));
|
||||
res.push.apply(res, ctx.matchResolve(editProps));
|
||||
}
|
||||
|
||||
|
||||
@@ -83,6 +83,9 @@ angular.module('myMod', ['adf.provider'])
|
||||
controller: ["$http", function($http){
|
||||
// control something
|
||||
}],
|
||||
apply: ["$http", "config", function($http, config){
|
||||
// apply configuration
|
||||
}],
|
||||
resolve: {
|
||||
editone: ["$http", "config", function($http, config){
|
||||
// resolve something
|
||||
|
||||
@@ -83,6 +83,9 @@ angular.module('myMod', ['adf.provider'])
|
||||
controller: function($http){
|
||||
// control something
|
||||
},
|
||||
apply: function($http, config){
|
||||
// apply configuration
|
||||
},
|
||||
resolve: {
|
||||
editone: function($http, config){
|
||||
// resolve something
|
||||
|
||||
Reference in New Issue
Block a user