$controller
service is responsible for instantiating controllers.
It's just simple call to $injector
, but extracted into
a service, so that one can override this service with BC version.
$controller(Class, locals);
Class – {Function|string} –
Constructor function of a controller to instantiate, or expression to read from current scope or window.
locals – {Object} –
Injection locals for Controller.