Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Typescript compiles down to ES5, so yes you can write in ES5 but it's not as pretty. You can create a class the standard way using `prototype` and from memory the annotations look something like this:

    MyComponent.annotations = [
      new angular.Component({
        selector: 'my-component'
      }),
      new angular.View({
        template: '<div></div>'
      })
    ];


They recently announced a "cleaner" syntax for ES5 mode. Looks more like the Angular 1 syntax.

http://blog.thoughtram.io/angular/2015/07/06/even-better-es5...




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: