2 ms·
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 t
by davej 11y ago
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>'
})
];
- highpixels 11y agoThey 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-code-for-angular-2.html http://blog.thoughtram.io/angular/2015/07/06/even-better-es5...