Dynamic generate Tab with content


#1

Hi,

We want to be able to dynamically generate the Tabs with dynamic content. However, we face a problem where we can’t view the last tab when we tap the last tab. Refer to the codepen below for example. Thanks.


#2

I’m a bit fuzzy on what I’m supposed to do to create the problem. Can you give some steps to reproduce?

I noticed this :

<link href="http://code.ionicframework.com/nightly/css/ionic.min.css" rel="stylesheet">
<script src="http://code.ionicframework.com/0.9.27/js/ionic.bundle.min.js"></script>

Make sure you’re using the same CSS and JS sources.


#3

Thanks, I have fixed the CSS to point to the same source.
To reproduce the error, when we first load the page, tab 1 content is displayed correctly, but the header or title is referring to tab 3. In addition, tab 3 (at the bottom) visual is shown to be selected, which we have not selected it.


#4

Ahhh… I see what you are saying. I’ve spent some time dabbling with it as well. I can’t find why it’s doing that either. I’m reaching out to the devs to see if they have an idea because it looks good to me.


#5

Andy has opened a ticket on this one. Seems the repeated tabContent view name is confusing the tabs controller.

Issue # 853 : https://github.com/driftyco/ionic/issues/853


#6

Yes, that’s exactly the problem, even with static tabs.
I currently got around by using different view names like “tabContent-1”, “tabContent-2”, …

Run into a new problem:
If you nest the tabs inside a sidemenu only the first tab gets generated (with beta 2)


#7

I have the same problem. Is there a solution/workaround for this problem?