I am experimenting with Angular. I have altered this fiddle for the purpose of this question.
When I try to access the scope variables "password" and "password_confirmation" from the directive, like this it displays them fine. See this fiddle. Like this:
scope.$apply(function(){
scope.passwordAsSeenByDirective = scope['password'] + "...";
scope.password_confirmationAsSeenByDirective = scope['password_confirmation'] + "...";
});
But when I make an object and put these as properties there, then I cannot access them any more. See this fiddle. Like this:
scope.$apply(function(){
scope.passwordAsSeenByDirective = scope['obj.password'] + "...";
scope.password_confirmationAsSeenByDirective = scope['obj.password_confirmation'] + "...";
});
How come?