2

I have set up a Plunker here to demonstrate my app:

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

<tabset>
  <tab ng-repeat="tab in tabs" heading="{{tab.title}}" select="getContent()" active="tab.active" disabled="tab.disabled">
  <div ng-hide="!tabs.isLoaded">
  <h1>{{tab.title}}</h1>
    <div ng-repeat="item in tabs.content">
      <p>{{item}}</p>
    </div>
  </div>
  <div ng-hide="tabs.isLoaded"><h3>Loading...</h3></div>
  </tab>
</tabset>

What I would like to do is only show the relevant content under each tab, at the moment the way I have set it up is I am pulling in all content in both tabs.

What is the best way to configure this?

Thanks in advance!

1 Answer 1

2

Change this $scope.tabs.content=res.data;

to

$scope.tabs.content=res.data[0].fruit;

Here is updated plunker

http://plnkr.co/edit/5Ng9PHkrluKUSzQhor34?p=preview

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

Comments

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.