Reputation: 835
I'm new to both of Ionic framework and angular js which I find really helpful.
I'm stuck with a tiny problem. I'm not able to make routing pages. I just wanna link two pages dynamically.
on the first page I have a list of friends using ng-repeat
.
when I click on a list item I want to show another page which contains all the details of the friend selected.
I was confused reading both of Angular js and Ionic documentation. so can you pease help with a simple code.
here is my code :
<div ng-controller="MyCtrl">
<ion-content>
<div class="list">
<div class="item item-divider">
Friends
</div>
<a class="item" href="#" ng-repeat="item in items">
<h3>{{item.name}}</h3>
</a>
</div>
</ion-cotent>
</div>
<script id="friend.html" type="text/ng-template">
<view left-buttons="leftButtons" right-buttons="rightButtons" hide-back-button="true" title="'Awesome'">
<content padding="true" has-header="true">
<h1>Friend details</h1>
</content>
</view>
</script>
Upvotes: 0
Views: 59
Reputation: 2665
I edited your CodePen, have a look. Yes you were missing $state
, as well as anuglar.config
. I hope you get clear on how to use states and how to pass data between them.
Upvotes: 2