Im fairly new to angular and have been able to get around somewhat. But I cant seem to find the answer to this scenario...
I have an array of objects, which I am pulling down from firebase. I am using an ng-repeat for the objects, then displaying data accordingly. I am trying to pass the index as a routeparam to an edit controller. In which case I would like to pull the object data as one would anticipate. However, when I filter the ng-repeat I am getting the index of the filtered content. where am I going wrong in finding the true index?
.config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {
$routeProvider
.when('/profiles/:index', {
templateUrl: '../views/profile.html',
controller: 'profileCtrl'
});
Route is above, Controller is below
.controller('profileCtrl', function( $scope, $routeParams ){
$scope.teamProfile = $scope.ourTeam[$routeParams.index];
$scope.index = $routeParams.index;
});
And finally the snippet of html from within the repeat.
<div class=profileName><a href=/profiles/{{$index}}>{{member.name}}</a><span class=handle>{{member.handle}}</span></div>