Tuesday, August 2, 2016

Writing Angular 1.5 components in TypeScript

I like the addition of components to Angular 1.5. Not only are they simpler  compared to directives, they also are the way forward to Angular 2.

Yesterday I was investigating with a  colleague why a specific component didn’t work. Turned out that it was a (stupid) typo in our TypeScript code.

We first thought we had a mistake in the way we constructed the component using TypeScript. So we unnecessary lost time questioning if our TypeScript implementation was causing the issue.

Therefore I add a quick code snippet  here as a reference for future usage:

No comments: