Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Carlos Casalicchio 106 posts 467 karma points
    May 19, 2016 @ 15:04
    Carlos Casalicchio

    Backoffice reference Media folder in Angular

    How can I get the Id of a media folder dynamically, using Angular?


        mediaResource.getChildren(ID) //wanna get the Id dynamically
                    .then(function (contentArray) {

    I'm creating an extension for the Backoffice were I need to list all the images of a specific folder, but I know that once I create it as a package, the Id may be different than what I have now. Hence, I need to figure out how to find that specific folder, getting the id dynamically.

  • Carlos Casalicchio 106 posts 467 karma points
    May 20, 2016 @ 03:16
    Carlos Casalicchio

    Nevermind... I've found an answer using entityResource"Social Media Channels Themes", "Media")
            .then(function (mediaArray) {
                var mediaId = mediaArray[0].id;
                    .then(function (contentArray) {
                        angular.forEach(contentArray.items, function (value, key) {
                            this.push(populateTheme(value, key));
                        }, engine.themes);
Please Sign in or register to post replies

Write your reply to: