Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Film strip is not working in Promise API calls

2769831Apr 11 2016 — edited Apr 12 2016

Hi all,

I need to have a film strip whose data is coming back from an API call. I put the observable array in a  Promise-based API call and the film strip is broken and it becomes a common div without any response.

For example:

    var tmp= [

            { name: 'Hydrogen' },

            { name: 'Helium' },

            { name: 'Lithium' },

            { name: 'Beryllium' },

            { name: 'Boron' },

            { name: 'Carbon' },

            { name: 'Nitrogen' },

            { name: 'Oxygen' },

            { name: 'Fluorine' },

            { name: 'Neon' },

            { name: 'Sodium' },

            { name: 'Magnesium' }

        ];

        self.chemicals(tmp);

If I put the above in the main block, it's fine but if I put it in an async Promise-based API call like below, it's broken:

someAPI.getChemical (queryParams)

            .then(function (c) {

           var tmp= [

            { name: 'Hydrogen' },

            { name: 'Helium' },

            { name: 'Lithium' },

            { name: 'Beryllium' },

            { name: 'Boron' },

            { name: 'Carbon' },

            { name: 'Nitrogen' },

            { name: 'Oxygen' },

            { name: 'Fluorine' },

            { name: 'Neon' },

            { name: 'Sodium' },

            { name: 'Magnesium' }

        ];

        self.chemicals(tmp);

            })

Can anyone please help? Any comments and opinions are much appreciated!

Regards,

Quincy

This post has been answered by Jim.Marion-Oracle on Apr 12 2016
Jump to Answer

Comments

Processing

Post Details

Added on Apr 11 2016
4 comments
893 views