Forgive my lameness in this question - but I’m super confused about how to access passed variables. Specifically - the sample app (sidemenu) provides a great template for what I’m trying to accomplish. Unfortunately, it lacks some specifics that would give me some insight into how things work.
.state('app.single', {
url: "/playlists/{playlistId}",
views: {
'menuContent' :{
templateUrl: "templates/playlist.html",
controller: 'PlaylistCtrl'
}
}
});
In the above example - we’re being directed to the playlist.html view - which supposedly will display the detail of the item selected. But, alas, that code is missing - any attempt to address the {{playlistId}} field is unsuccessful. I’ve read several posts about angular and how it’s accomplished in, perhaps, a few different ways - but I can’t wrap my head around the correct syntax or what specifically is supposed to occur. I realize it’s a scoping issue - the variable isn’t available because it’s not in the current scope (even though it appears that it should be.
Any insight on how to properly code this would be helpful - it’d be even more helpful if the sample templates had that code already available.
Thank you,
Eric Brown