Skip to content

Commit

Permalink
fix issue with objects
Browse files Browse the repository at this point in the history
  • Loading branch information
btford committed Jan 1, 2013
1 parent dcd8a92 commit 1981627
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions js/inject/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,22 @@ var inject = function () {
].forEach(function (met) {
var temp = $provide[met];
$provide[met] = function (name, definition) {
debug.deps.push({
name: name,
imports: annotate(definition)
});
if (typeof name === 'object') {
angular.forEach(name, function (value, key) {
name[key] = function () {
debug.deps.push({
name: key,
imports: annotate(value)
});
return value.apply(this, arguments);
};
});
} else {
debug.deps.push({
name: name,
imports: annotate(definition)
});
}
return temp.apply(this, arguments);
};
});
Expand Down

0 comments on commit 1981627

Please sign in to comment.