Skip to content Skip to sidebar Skip to footer

Getting An Image To Appear On A Popup Window With Angular Js

This is my first post on StackOverflow and I am teaching myself Angular, so I am a beginner and currently confused. I am creating a webpage with Angular and one of the pages involv

Solution 1:

In your instructionController.js -

self.showDetails = function(id) {
    for (var i =0; i < this.steps.length; i++) {
        if (self.steps[i].id === id) {
            self.name =self.steps[i].name;
            self.step =self.steps[i].step;
            self.description =self.steps[i].description;



    ## self.figure =self.steps[i].figure;
    ## self.alt =self.alt[i].alt;
    ## self.imageCaption =self.imageCaption[i].imageCaption

            self.showValue =true;
        }
    }
};

The lines starting with ## are the ones you need to add So basically you forgot to loop the above highlighted lines. Hope this helps.

Post a Comment for "Getting An Image To Appear On A Popup Window With Angular Js"