Before digging into any particular recipe, it is highly advised to first read general overview how to do things in your app
Here we will demonstrate how to migrate from existing code base, to Typescript with ng-metadata.
We assume that your code is following John Papa's styleguide, because that's the idiomatic AngularJs style with ES5
Note that examples for ES5 count's on that you have some build steps that concatenates your js files, because ES5 doesn't has module system
How it all works behind the scenes can be seen in ng-metadata's creator Martin Hochel's talk