bindToController in unit tests
In Angular 1.3 (see below for 1.4+) Digging into the AngularJS source code I found an undocumented third argument to the $controller service called later (see $controller source). If true, $controller() returns a Function with a property instance on which you can set properties. When you’re ready to instantiate the controller, call the function and … Read more