I'm trying to learn both typescript and angularjs (and thus javascript as i'm a noob)
going through the angularjs tutorials, I see they do stuff like this:
in normal javascript:
//for full example, see the "Wire up a backend" project.js example
//on the main page of http://angularjs.org
function CreateCtrl($scope, $location, Project){
//do stuff
}
the kicker is, those parameters could be in any order (or not there at all), and Project is actually a user defined variable/type. The angularjs framework is able to map the parameters to actual objects.
So now to Typescript, how can I recreate this type of functionality? I actually would like to describe angularjs's behavior in some way to let me wrap it in typescript, (strongly type this flexible property injection)
any ideas?
See Question&Answers more detail:os