{"action":"opened","issue":{"url":"https://api.github.com/repos/olov/ng-annotate/issues/242","repository_url":"https://api.github.com/repos/olov/ng-annotate","labels_url":"https://api.github.com/repos/olov/ng-annotate/issues/242/labels{/name}","comments_url":"https://api.github.com/repos/olov/ng-annotate/issues/242/comments","events_url":"https://api.github.com/repos/olov/ng-annotate/issues/242/events","html_url":"https://github.com/olov/ng-annotate/issues/242","id":153717542,"number":242,"title":"angular.extend() support","user":{"login":"aramk","id":574282,"avatar_url":"https://avatars.githubusercontent.com/u/574282?v=3","gravatar_id":"","url":"https://api.github.com/users/aramk","html_url":"https://github.com/aramk","followers_url":"https://api.github.com/users/aramk/followers","following_url":"https://api.github.com/users/aramk/following{/other_user}","gists_url":"https://api.github.com/users/aramk/gists{/gist_id}","starred_url":"https://api.github.com/users/aramk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aramk/subscriptions","organizations_url":"https://api.github.com/users/aramk/orgs","repos_url":"https://api.github.com/users/aramk/repos","events_url":"https://api.github.com/users/aramk/events{/privacy}","received_events_url":"https://api.github.com/users/aramk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-09T07:26:12Z","updated_at":"2016-05-09T07:26:12Z","closed_at":null,"body":"`angular.extend()` usage doesn't seem to be supported by ng-annotate:\r\n```\r\nexport default ngModule => {\r\n  ngModule.directive('fooBar', (fooBar) => {\r\n    return angular.extend({}, fooBar[0], {\r\n      restrict: 'A',\r\n      template: require('./template.html'),\r\n      controllerAs: 'vm',\r\n      controller: function($state, $window) {\r\n        // ...\r\n      }\r\n    });\r\n  })\r\n}\r\n```\r\nAdding `/*@ngInject*/` did it for me:\r\n```\r\nexport default ngModule => {\r\n  ngModule.directive('fooBar', (fooBar) => {\r\n    return angular.extend({}, fooBar[0], {\r\n      restrict: 'A',\r\n      template: require('./template.html'),\r\n      controllerAs: 'vm',\r\n      controller: /*@ngInject*/ function($state, $window) {\r\n        // ...\r\n      }\r\n    });\r\n  })\r\n}\r\n```"}}