{"action":"created","issue":{"url":"https://api.github.com/repos/babel/babel/issues/2120","labels_url":"https://api.github.com/repos/babel/babel/issues/2120/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel/issues/2120/comments","events_url":"https://api.github.com/repos/babel/babel/issues/2120/events","html_url":"https://github.com/babel/babel/issues/2120","id":98023106,"number":2120,"title":"Angular2 annotations appear to be undefined","user":{"login":"blacksonic","id":602571,"avatar_url":"https://avatars.githubusercontent.com/u/602571?v=3","gravatar_id":"","url":"https://api.github.com/users/blacksonic","html_url":"https://github.com/blacksonic","followers_url":"https://api.github.com/users/blacksonic/followers","following_url":"https://api.github.com/users/blacksonic/following{/other_user}","gists_url":"https://api.github.com/users/blacksonic/gists{/gist_id}","starred_url":"https://api.github.com/users/blacksonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blacksonic/subscriptions","organizations_url":"https://api.github.com/users/blacksonic/orgs","repos_url":"https://api.github.com/users/blacksonic/repos","events_url":"https://api.github.com/users/blacksonic/events{/privacy}","received_events_url":"https://api.github.com/users/blacksonic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-29T20:31:42Z","updated_at":"2015-07-29T20:32:46Z","closed_at":null,"body":"I have the following Angular2 code what i transpile with browserify and babel:\r\n```\r\nimport {ComponentAnnotation, ViewAnnotation, bootstrap} from 'angular2/angular2';\r\n\r\n@ComponentAnnotation({\r\n  selector: 'hello-cmp'\r\n})\r\n@ViewAnnotation({\r\n  template: 'Hello World!'\r\n})\r\nclass HelloComponent {}\r\n\r\nbootstrap(HelloComponent);\r\n```\r\nIt transpiles well, but when i run the code iget the following error for annotations, but ```console.log``` show defined functions:\r\n``` Uncaught TypeError: _angular2Angular2.ViewAnnotation(...) is not a function ```\r\n\r\nI tried ES5 syntax and it works, so the annotation functions of Angular2 are really there:\r\n```\r\nvar HelloComponent = function () {\r\n\r\n};\r\n\r\nHelloComponent.annotations = [\r\n  new ComponentAnnotation({\r\n    selector: 'hello-cmp'\r\n  }),\r\n  new ViewAnnotation({\r\n    template: 'Hello World!'\r\n  })\r\n];\r\n```\r\n\r\nHere is the transpiled code also:\r\n```\r\nvar _angular2Angular2 = require('angular2/angular2');\r\n\r\nconsole.log(_angular2Angular2.ComponentAnnotation, _angular2Angular2.ViewAnnotation);\r\n\r\nvar HelloComponent = (function () {\r\n  function HelloComponent() {\r\n    _classCallCheck(this, _HelloComponent);\r\n  }\r\n\r\n  var _HelloComponent = HelloComponent;\r\n  HelloComponent = _angular2Angular2.ViewAnnotation({\r\n    template: 'Hello World!'\r\n  })(HelloComponent) || HelloComponent;\r\n  HelloComponent = _angular2Angular2.ComponentAnnotation({\r\n    selector: 'hello-cmp'\r\n  })(HelloComponent) || HelloComponent;\r\n  return HelloComponent;\r\n})();\r\n\r\n_angular2Angular2.bootstrap(HelloComponent);\r\n```\r\n\r\nAm i missing something here?"},"comment":{"url":"https://api.github.com/repos/babel/babel/issues/comments/126087160","html_url":"https://github.com/babel/babel/issues/2120#issuecomment-126087160","issue_url":"https://api.github.com/repos/babel/babel/issues/2120","id":126087160,"user":{"login":"blacksonic","id":602571,"avatar_url":"https://avatars.githubusercontent.com/u/602571?v=3","gravatar_id":"","url":"https://api.github.com/users/blacksonic","html_url":"https://github.com/blacksonic","followers_url":"https://api.github.com/users/blacksonic/followers","following_url":"https://api.github.com/users/blacksonic/following{/other_user}","gists_url":"https://api.github.com/users/blacksonic/gists{/gist_id}","starred_url":"https://api.github.com/users/blacksonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blacksonic/subscriptions","organizations_url":"https://api.github.com/users/blacksonic/orgs","repos_url":"https://api.github.com/users/blacksonic/repos","events_url":"https://api.github.com/users/blacksonic/events{/privacy}","received_events_url":"https://api.github.com/users/blacksonic/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T20:32:46Z","updated_at":"2015-07-29T20:32:46Z","body":"I have a repository also where u can check it after ```npm install && gulp start```:\r\nhttps://github.com/blacksonic/koan2do"}}