angular1 controllerAs with ngRoute

Developer from somewhere

Problem: want to use controller as with ngRoute

Solution:

$routeProvider
    .when('/somePath', {
        template: htmlTemplate,
        controller: 'myController as ctrl'
    });