Hi all,
My html page:
<ion-view view-title="Posts">
<ion-content>
<ion-list>
<div class="list card" ng-repeat="post in posts" type="item-text-wrap">
<div class="item item-avatar">
<img ng-src="{{post.user_avatar}}">
<h2>{{post.user_name}}</h2>
<p>{{post.post_date}}</p>
</div>
<a href="#/posts/{{post.id}}"><div class="item item-image image-content">
</p>1111111111<p>
</div></a>
<div class="item item-image">
<a href="#/posts/{{post.id}}"><img ng-src="{{post.poll_img}}"></a>
</div>
<div class="poll-count">
</p>{{post.poll_num}}<p>
</div>
</div>
</ion-list>
</ion-content>
</ion-view>
the app.js code:
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('posts', {
url: '/posts',
templateUrl: 'templates/posts.html',
controller: 'PostsCtrl'
})
.state('posts.detail', {
url: '/:pollId',
templateUrl: 'templates/poll.html',
controller: 'PostDetailCtrl'
})
// if none of the above states are matched, use this as the fallback
$urlRouterProvider.otherwise('/posts');
});
both of these are mostly borrowed from the tab sample. When I click the image, the âPostDetailCtrlâ doesnât proceed. Why is that happened?