I'm starting to develop an application with the awesome ionic framework.
I've managed with your help of course to make a striped tabs which work perfectly. now i'm facing a problem with adding script to the ion-view content.
here is my tabs code : my ionic tabs CODEPEN
and here is my page which I want to integrate as a tab content : my tab content which i want to ingegrate CODEPEN
Can i do something like that ?
<ion-view title="Home">
<div ng-controller="customersCtrl">
<div class="list">
<div ng-repeat="(competitionname, competition) in MatchesByCompetition">
<div class="item item-divider" >
{{ competition.name }}
</div>
<a class="item" href="#" align="center" ng-repeat="matche in competition.matches" >
<img ng-src="http://media-v4.i-dalgo3.com/Sport/Football/Team/Logo/55x55/logo_{{matche.team1.idTeam}}.png" style="width:28px; height:28px; position:absolute; left:10px; top:12px">
<h4 style=" display:inline-block; left:60px; position:absolute;"> {{matche.team1.name}}</h4> <h5 style=" display:inline-block;"> {{matche.newstartdate}}</h5> <h4 style=" display:inline-block; position:absolute; right:60px; ">{{matche.team2.name}}</h4>
<img ng-src="http://media-v4.i-dalgo3.com/Sport/Football/Team/Logo/55x55/logo_{{matche.team2.idTeam}}.png" style="width:28px; height:28px; position:absolute; right:10px; top:12px" >
</a>
</div>
</div>
</div>
</ion-view>
What you can do is, you can add another tab
<ion-tab title="list" ui-sref="list">
<ion-nav-view name="list"></ion-nav-view>
</ion-tab>
and instead of using inline scrips like <script type="text/ng-template" id="home.html">
you can tell ui-router
the to load an external page
in your router
.state('list', {
url: '/list',
views: {
list: {
controler: 'customersCtrl',
templateUrl: '<path to your file>list.html'
}
}
})
and in fact its a good idea to move all your inline scripts to separate files
HTH