Added angular.toJson