I created an app with $ ionic start myapp sidemenu
and saw that it printed items that each link to the same page with a different playlist.id. Is there a way to show the playlist.id on the linked page? For example, if I click on the second item from the playlist tab and link to the playlist page, is there a way to print that specific item’s id on that page?
@Ph33ly you betcha.
In playlist.html
:
<ion-view view-title="Playlist">
<ion-content>
<h1>Playlist - {{ playlistId }}</h1>
</ion-content>
</ion-view>
In controllers.js
:
.controller('PlaylistCtrl', function($scope, $stateParams) {
$scope.playlistId = $stateParams.playlistId;
});