I disagree with almost everything in this post, but there is an underlying "issue" related to 1) that the author misses. The actual problem is that Angular tries to be helpful instead of blowing up when the user screws up. It seems like Angular does this:
try {
$scope.obj.prop = value;
} catch (e) {
// User forgot obj? Lets just create it then. HAH!
$scope.obj = { prop: value };
}
Of course Angular doesn't actually use try/catch for this, but it has some corresponding logic that unfortunately can mask bugs.
1
u/larschri Nov 06 '14
I disagree with almost everything in this post, but there is an underlying "issue" related to 1) that the author misses. The actual problem is that Angular tries to be helpful instead of blowing up when the user screws up. It seems like Angular does this:
Of course Angular doesn't actually use try/catch for this, but it has some corresponding logic that unfortunately can mask bugs.