0

I have been spinning my wheels on this one. Reading through most of the answers on stackoverfolw has helped me understand more about building nested arrays and using .json files. I still cannot figure out what I'm not doing correctly.
I am trying to build a image viewer for my artwork using Angular. I want to create a .json file that will used to "index/category my work" This way I can use Angular to call the files, names and other data to view without all the hard coding img src and such. Here is a link to JSFiddle that I have been messing with. I cannot understand how to pull data from the nested array. If someone could point me in the right direction I would really appreciate the help on this.

1 Answer 1

1

I have updated the plunker, Please see. Your json was coming in data object in received output of web service.

 $scope.fetchContent = function () {
    $http.get($scope.url).then(function (data){
        $scope.portfolio = data.data;
      });
  }

http://plnkr.co/edit/GH14vIWzKVSOdA3wI0Bb?p=preview

Sign up to request clarification or add additional context in comments.

1 Comment

Rock on thanks pankaj. Just a question about data.data? Why are we creating a prototype for data? I know this in jQuery as a prototype is this using the jqLite in AngularJS?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.