Hi all, I’m revamping some of our themes (I’m one of the authors at ionicthemes.com) from ionic1 to #ionic2.
I’m unable to get this particular view with Ionic 2.
The approach I followed with ionic 1 was simple, I just used one ion-nav-view
inside other ion-view.
(routes)
.state('app.profile.posts', {
url: '/posts',
views: {
'profileContent': {
templateUrl: 'views/app/profile/profile.details.html'
},
'profileSubContent@app.profile.posts': {
templateUrl: 'views/app/profile/profile.posts.html'
}
}
})
.state('app.profile.pics', {
url: '/pics',
views: {
'profileContent': {
templateUrl: 'views/app/profile/profile.details.html'
},
'profileSubContent@app.profile.pics': {
templateUrl: 'views/app/profile/profile.pics.html'
}
}
})
(layout)
<ion-view class="profile-details" view-title="Profile">
<div class="row profile-details-section">
<!-- User image -->
<!-- User bio -->
<!-- etc -->
</div>
<div class="row profile-details-section split-actions">
<div class="col user-interaction" role="tab">
<!-- Button 1 (click)='app.profile.posts' -->
<a ng-click="getUserPosts()">
All Posts
</a>
</div>
<div class="col user-interaction">
<!-- Button 2 (click)='app.profile.pics' -->
<a ng-click="getUserPics()" role="tab">
Pics
</a>
</div>
</div>
<ion-nav-view class="profile-sub-views-outer" name="profileSubContent"></ion-nav-view>
</ion-view>
@brandyshea you mentioned something about using segments (https://twitter.com/brandyscarney/status/773612024714629120).
It’s a great idea, will try that.
Can you give me some more tips on which would be the best approach to pull the data when switching segments with angular 2/ionic 2?