AngularJS ng-repeat filter fails to update multiple columns at once

Here is the ng-repeat markup being used:

<tbody>
  <tr ng-repeat=
  "(k, v) in loanapps | filter:SelectedStatus | filter:SelectedBorrower track by $index">
  <td>{{v.Id}}</td>

    <td><a ui-sref="adminloandetails({loanid:{{v.Id}}})">{{v.Name}}</a></td>

    <td class="hidden-xs">{{v.AmountYouWishToBorrow | currency:"&euro;"}}</td>

    <td><span ng-class=
    "{'label label-default': v.LoanStatus == 'Waiting for Meeting', 'label label-success': v.LoanStatus == 'Under Review'}">
    {{v.LoanStatus}}</span></td>

    <td>{{v.ApplicationDate | date:'yyyy-MM-dd HH:mm:ss'}}</td>

    <td><a ui-sref="adminloandetails({loanid:{{v.Id}}})" class=
    "btn dark btn-sm btn-outline sbold uppercase">View</a></td>
  </tr>
</tbody>

While the filter correctly updates all data, it seems that the v.Id within the ui-sref attribute is not updating according to the row value. The id passed to the adminloandetails view remains the same as the previous value.

Interestingly, the first td element containing the id is updated correctly; only the v.Id within the ui-sref attribute is not updating.

Does anyone have any suggestions on what changes need to be made?

Answer №1

Give this a shot:

ui-sref="adminloandetails({loanid: v.Id})"

No need to manually evaluate the variables before passing them to ui-sref, as the directive is designed to handle expressions automatically!

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Tips for verifying the contents of a textbox with the help of a Bootstrap

I am still learning javascript and I want to make a banner appear if the textbox is empty, but it's not working. How can I use bootstrap banners to create an alert? <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8&g ...

Using a custom function from the controller to apply an AngularJS filter

I need help filtering a table based on age using conditions of less than and greater than 25 years. Click here to see the demonstration The filter function is not working correctly. It returns no results for ages less than 25, and it returns ages 44 and ...

Tutorials on transferring selected option data to a component

My JSON data is structured like this: Whenever I choose an option, I want to pass the values (code and description) from the JSON object to the component. nameList= [ { "code": "1", "description": "abc" }, { "code": "123", "descript ...

find all occurrences except for the last of a pattern in javascript

When considering the patterns below: "profile[foreclosure_defenses_attributes][0][some_text]" "something[something_else_attributes][0][hello_attributes][0][other_stuff]" It is possible to extract the last part by utilizing non-capturing groups: var rege ...

Tips for refreshing jQuery to ensure it functions smoothly for subsequent tasks

I am facing an issue with running a second process under JQuery, as shown in the code snippet below: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> <body> <script type=" ...

Stopping the PanResponder in React Native temporarily: A guide

Here is the snippet to create an instance of the panResponder: constructor( props ) { super( props ); this.position = new Animated.ValueXY(); this.panResponder = PanResponder.create( { onStartShouldSetPanResponder: ( ) => true, ...

Leveraging Angular to retrieve images from Google Feed API

I'm currently working on developing an RSS reader and trying to integrate images from the Google Feed API. While I have successfully extracted the publishedDate and contentSnippet, I am facing difficulty in getting the image src. The code snippets bel ...

JavaScript Array join() method returns an empty string

As a beginner in the world of javascript, I am just starting to dip my toes into it. In the past, I have used join() without any issues, but now I am facing a problem where this join is returning an empty string. Upon inspecting myArray, the data seems t ...

Exploring the elements within array structures

I'm facing an issue with my API response. I'm trying to filter the links and check if the source and target name properties in each object match a specific string. However, I am having trouble accessing the name property. Any suggestions on how I ...

What is the best way to instruct Vite to exclude specific files within a directory from the build process?

After initializing a fresh Vue application with the command npm create vue, I implemented a functionality where the app fetches a configuration at runtime and extracts a component name from it. These dynamic components reside in a directory called "pluggab ...

Scroll bar in div that scrolls dynamically at the bottom

$('textarea').on('input', function() { var scrollHeight = parseInt($(this).prop('scrollHeight')); $(this).height(scrollHeight); $(this).prev('.Content').outerHeight(300 - $(this).outerHeight()); }); $(".Cont ...

Having difficulty scrolling down in a section with 100% height on iOS devices

Currently facing an issue with a website I am creating for my wedding invitation. The top section is set to have a 100% height and requires scrolling to view the rest of the content. While it functions perfectly on FireFox / Chrome on my computer, there s ...

Remove an item from a complex JSON structure based on the specified name. The function will then return the

Hey there, I'm just starting out with react native and I have an array of objects. My goal is to remove an inner object from this JSON data. [ { Key: 1, exchnageArr: [ { name: ”FX” }, { name: ”MK” ...

What could be causing my JavaScript function to not properly set the CSS display property to "inline" for an image element?

Objective: My goal is to design a webpage featuring a basic image of fruits. Upon clicking the image, it should transform into an array of 6 images showcasing various types of fruits such as apples, oranges, and bananas arranged in two rows with three imag ...

What is the best way to retrieve items from MongoDB and keep them updated when a new one is added?

Building a blog using React, Express, MongoDB and Node is proving to be challenging for me. Specifically, I am struggling with (1) how to correctly execute AJAX requests to my database and manage state, and (2) how to effectively update the state. I attem ...

Add a fresh record only if it contains information and there are no existing duplicates present

Is it possible to create a note with both a title and text, under certain conditions? The title must not be empty The title cannot already exist in the system When attempting to check for duplicates within my array, the boolean value always returns true ...

Customize the duration of Skeleton animations in Material UI

The <Skeleton> components in mui utilize pulse or wavy animations. Wondering if there's a method to quicken this animation, perhaps by adjusting the duration? ...

The toggle function for the classList ('open') is functioning correctly and can be seen in the inspect element tool, however, the website is not displaying the associated style

How can I make the .nav show styles in .open after clicking #menu-icon? Note: I used Bootstrap to create the nav HTML <!-- logo --> <div class="logo"> <img src="assets/logo.png" alt="logo g's shop& ...

Change the format into a PHP array

In my workplace, I am confronted with a frustrating system that generates the following output: { party:"bases", number:"1", id:"xx_3039366", url:"systen01-ny.com", target:"_self", address:"Ch\u00e3o as Alminhas-Medas,Uteiros ...

Enhance LCP Performance in Next.js for Faster Loading Speeds

I'm currently working on a next.js project (version 11.1.2) and my goal is to improve the page speed performance. To track this, I am using Google PageSpeed Insight for evaluation. Presently, the scores stand at: 40-50 for mobile (!!) 80-90 for deskt ...