Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working when tabs are dinamically created #44

Open
FrancescoMussi opened this issue May 26, 2016 · 5 comments
Open

Not working when tabs are dinamically created #44

FrancescoMussi opened this issue May 26, 2016 · 5 comments

Comments

@FrancescoMussi
Copy link

FrancescoMussi commented May 26, 2016

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
Copy link
Author

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.

@infinito84
Copy link

infinito84 commented Jun 15, 2016

This works for me:

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

And add data_test.days to $scope

@FrancescoMussi
Copy link
Author

FrancescoMussi commented Jun 16, 2016

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.

@infinito84
Copy link

infinito84 commented Jun 16, 2016

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.

@FrancescoMussi
Copy link
Author

Yes, good point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants