marcoslin / angularAMD

Facilitate use of RequireJS in AngularJS
http://marcoslin.github.io/angularAMD
MIT License
734 stars 171 forks source link

Add support for controller functions with prototypes. #164

Closed alexperovich closed 8 years ago

alexperovich commented 8 years ago

This change adds support for controller functions that have functions defined in their prototype. This works correctly in angular by default because the __proto__ property is set correctly when angular loads the controller.

When the controller is loaded by requirejs the __proto__ property is set to the prototype of the intermediate controller function not the function loaded by requirejs.

The use case for this is controllers defined as Typescript classes.