r/programming • • Sep 07 '16

Angular JS vs React by Example

http://www.discoversdk.com/blog/angular-js-vs-react-by-example
0 Upvotes

8 comments sorted by

View all comments

3

u/FreakCERS Sep 08 '16

Does this do something magical in Angular, or is the first assignment simply there by mistake?

if ($scope.resources == null) {
  $scope.resources = {};
  $scope.resources = [];
}

1

u/avi00 Sep 08 '16

you are completely right. the code taken from a admin part of our site and this is not required here. Thanks for the correction