Through an HttpResponseMessage MVC4 successfully sends an AngularJs controller $scope of GetAllFolders().
A Folder in the collection has among other things and association to the Photo class.
Folders can be folders of other folders (self-referencing).
Debugging shows from MVC4 side all is good and correct detail information was returned.
But through Angular/Json, certain properties are $ref tag and can not be seen, as example:
I do not care much for creating a method call on FkPhotoId and hit the server for the image name when I know it was already sent in the first response.
Any ideas?
UPDATE: SOLUTION
This code was added in the global.asax: (make sure you reference it in the start method)
public static void ConfigureApi(HttpConfiguration config)
{
var json = config.Formatters.JsonFormatter;
config.Formatters.Remove(config.Formatters.XmlFormatter);
config.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
}