r/javascript • • Nov 05 '14

AngularJS: The bad parts

http://larseidnes.com/2014/11/05/angularjs-the-bad-parts/
87 Upvotes

88 comments sorted by

View all comments

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:

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.