neiza neiza - 1 year ago 51
AngularJS Question

passing url parameters in angular

I'm trying to pass some url parameter between view to get the detail of a particular user but i'm finding it hard to do

below is the js and html



//pass profile_id to view detail of a user bound to 'profile_detail_ctrl' controller

templateUrl: 'templates/profile/profile.html',
controller: 'profile_detail_ctrl'



<ion-item href="#/tab/source/{{item.profile_id}}">
<div class="item item-avatar">
<img src="../usr_up_img/{{item.profile_pix}}">
<p>November 05, 1955</p>


When a user clicks on the link
. it should navigate to the page which contains the details of the user

Answer Source

As far as i can deduct from your code, you are making mistake in retrieving the data. You need to send your profile_id which comes from $stateParams as follows.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download