Fix $scope.blocksLength assignment in index controller

There is a small typo (res.lenght) in the assignment to $scope.blocksLength that causes the value to always be "undefined."

Possibly the value is not used anywhere (since this has not come up before), however this fix will make it possible for future features to make use of the result.