ionic icon indicating copy to clipboard operation
ionic copied to clipboard

Not working when tabs are dinamically created

Open FrancescoMussi opened this issue 8 years ago • 5 comments

Pleaseeeeeeeeeee help!!

The dummy data test of the plugin is working perfectly. But when i generate the tabs dinamically using ng-repeat it doesn't work.

This is a simple example of taking the data from an object:

$rootScope.data_test = {};
$rootScope.data_test.days = ['Day 1','Day 2'];
<tab-slide-box>
     <div class="tsb-icons">
         <div class="tsb-ic-wrp">
            <a href="javascript:;" class="ion-home" ng-repeat="day in data_test.days track by $index"></a>
        {{ day }}
          </div>
     </div>
     <ion-slide-box show-pager="false" on-slide-changed="slideHasChanged($index)">
             <ion-slide>
                   <h1>Day 1 content</h1>
             </ion-slide>
              <ion-slide>
                    <h1>Day 2 content</h1>
              </ion-slide>
      </ion-slide-box>
</tab-slide-box>

What can i do? There is something i am missing? Thank you!

FrancescoMussi avatar May 26 '16 12:05 FrancescoMussi

Ok i find a workaround making something by my own using ion-scroll: http://ionicframework.com/docs/api/directive/ionScroll/

Anyway if the project is not updated anymore i suggest you to remove it from github. It will save some time to other developers.

FrancescoMussi avatar May 27 '16 07:05 FrancescoMussi

This works for me:

<tab-slide-box ng-if="data_test.days">

And add data_test.days to $scope

infinito84 avatar Jun 15 '16 18:06 infinito84

Thanks. I prefere anyway not to use a dead plugin. I can make a very similar thing using ion-scroll, except for the possibility to swipe. But it's okay.

FrancescoMussi avatar Jun 16 '16 07:06 FrancescoMussi

Yes, me too, but I'm integrating and implementing services, and plugins, developed, by another frontend enginner, so, I had to, but the solution is easy, and could help to others.

infinito84 avatar Jun 16 '16 07:06 infinito84

Yes, good point.

FrancescoMussi avatar Jun 16 '16 07:06 FrancescoMussi