AngualrJS determine if id belongs to media or content
Hello,
Is there a way in AngualrJS to determine if an ID belongs to an Umbraco media item or content item.
I'm using contentResource.getById and mediaResource.getById, but I'm looking for a clean way to determine which of these I should call. As one of these will throw an error .
AngualrJS determine if id belongs to media or content
Hello,
Is there a way in AngualrJS to determine if an ID belongs to an Umbraco media item or content item.
I'm using contentResource.getById and mediaResource.getById, but I'm looking for a clean way to determine which of these I should call. As one of these will throw an error .
Thanks Paul
Hi Paul,
I use the
application
value in themetaData
.e.g assuming
vm.entity
is the "content" object you are working with.is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.