how to show li tag based on index value in angularjs

Question!

i have a html like this,

  <div class="main">
     <ul>
         <li ng-repeat='save in saves'>
           <h3>{{save.name}}</h3>
           <div >
              <ul>
                <li ng-repeat='story in stories'>
                   <div  ng-show="story.display"><label>welcome</label></div>
                   <div  ng-show="!story.display"><input type="text"></div>
                </li>
              </ul>
           </div>
            <div ng-click="add()">Click</div>
         </li>
     </ul>
     <div ng-click="theme()">Add theme</div>
  </div>

my contoller like this

       $scope.saves=[];
       $scope.stories=[];
       $scope.theme=function()
      {
         $scope.saves.push({name:'joseph',name:'john',name'peter'});
      };
      $scope.add=function()
      {
        $scope.stories.push({display:'false'});
      };

Here i am doing this ,

When user click on addtheme button i am pushing name into saves (Array) and then repeating it with li tag so out put like this

  joseph

  click

  john

  click

  peter 

  click

so when again user click on click , i want to show only one textbox for specific clicked li..but here what happened , when i click on click button it is showing three text box for three li tag....

How to open specific textbox?



Answers

your can replace

By : Kain


This video can help you solving your question :)
By: admin