Using alias for controller with ng-controller

Last Updated on

We could use ng-controller to give an controller an alias within the same html page, i.e., view . Normally, I would set this up as part of a state’s config and have it invoked via the angular.run function.

The Recommended way

– OR –

The Alternative way

An alternative way uses only ng-controller with the “AS <ALIAS-NAME>” convention.

Download the Files

You may download a working example via the following URL.



Karl San Gabriel

Professional Software Developer