Saves all collections and its attributes to $scope.collections object.
Accesses currentCollection and currentAttributes using this object.