When you define var vm = this;inside nestedDirectiveController, the scope is vmlimited only nestedDirectiveController.
Since the directive has an isolated scope, and your template uses this function nestedDirectiveControllerto evaluate the expression, it gets the value title null, and we do not see the name.
, scope : true config . , .
angular
.module('app')
.directive('nestedDirective', function() {
return {
restrict: 'E',
scope: true,
controller: 'nestedDirectiveController',
controllerAs: 'vm',
template:'<div> {{vm.message}} </div>'
};
});
. Codepen