Hey I was wondering if someone could show me a quick example of how I could print a specific item’s title after I click on their specific link.
In my mainPage I have
<ion-view view-title="main">
<ion-content>
<ion-list>
<ion-item ng-repeat="page in sidePages" href="#/abstractMain/mainPage/{{page.id}}">
{{page.title}}
</ion-item>
</ion-list>
</ion-content>
</ion-view>
Each item is linked to my Page view
<ion-view view-title="Page">
<ion-content>
<h1>Hello</h1>
</ion-content>
</ion-view>
and my controller for sidePages is
app.controller('pageCtrl', function($scope){
$scope.sidePages = [
{ title: 'name 1', id: 1 },
{ title: 'name 2', id: 2 },
{ title: 'name 3', id: 3 },
{ title: 'name 4', id: 4 },
{ title: 'name 5', id: 5 },
{ title: 'name 6', id: 6 }
];
});
I guess to be more specific I’m asking how to show each sidePages title when you click to their page because right now they all just print “Hello.”