Uncertain as to the reason behind why the ng-repeat-start and ng-repeat-end are causing an

To begin, let's provide some background on what I aim to accomplish:

<tr  ng-repeat-start="eachParam in myArray">
    <td rowspan=2>On site</td>
    <td rowspan="2" class = "success">{{eachParam.support}}</td>
    <td class = "warning">FE</td>
</tr>
<tr>
    <td class = "warning">BE</td>
</tr ng-repeat-end>

The expected outcome should resemble the following structure:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>


<table class = "table table-bordered">
  <tbody>
    <!-- Repeat 1-->
    <tr>
      <td rowspan = 2>super parent1</td>
      <td rowspan = 2>parent1.1</td>
      <td>child 1.1.1</td>
    </tr>
    
    <tr>
      <td>child 1.1.2</td>
    </tr>
    <!-- Repeat 2-->
    <tr>
      <td rowspan = 2>super parent2</td>
      <td rowspan = 2>parent2.1</td>
      <td>child 2.1.1</td>
    </tr>
    
    <tr>
      <td>child 2.1.2</td>
    </tr>
  </tbody>
</table>

As shown in the snippet, I intend to use ng-repeat-start and ng-repeat-end to repeat the two super parents in order to include the intermediate <tr> elements during repeating.

It's important to note that the childs are static elements.

However, I am encountering an exception:

Unterminated attribute, found 'ng-repeat-start' but no matching 'ng-repeat-end' found

Answer №1

In order to correctly implement the ng-repeat-end attribute, it should be added to the opening tag of the tr element rather than the closing tag. Here is the proper way to structure it:

<tr ng-repeat-start="eachParam in myArray">
    <td rowspan=2>On site</td>
    <td rowspan="2" class = "success">{{eachParam.support}}</td>
    <td class = "warning">FE</td>
</tr>
<tr ng-repeat-end>
    <td class = "warning">BE</td>
</tr>

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

Sorting data in AngularJS using the OrderBy filter in ascending

I am using ng-repeat in my code: <label ng-repeat="atp in Keywords | unique:'atp'"> {{atp}} </label> The values in atp are as follows: client animal zoo boat I want the final output to be: animal boat client zoo Thank you for ...

How to change a date object into a datestring using the TZ format in JavaScript

Here is the input: const date = "06/01/2018" const time = "06:25:00" The desired output format is a string like this: "2018-06-01T00:55:00.000Z". I attempted to create the Date object using const result = new Date(date + time); //outputs an obje ...

Having difficulties in Vue while attempting to access a particular row

I encountered an error message stating Uncaught TypeError: snapShotChnaged.forEach is not a function. My goal is to retrieve specific row data, which is why I am utilizing the doc method. retrieveSpecificDonation() { firestore .collection('d ...

Run a series of promises in an array one after the other without relying on async and await

Imagine having an array filled with promises. Each element in this array represents a knex.js query builder that is prepared to be executed and generates a promise. Is there a way to execute each element of this dynamically built array sequentially? let ...

The JQuery ajax success callback seems to stick around forever, never getting cleaned up

Apologies for the unusual JavaScript code, as it is compiled from CoffeeScript. Whenever specific events occur in my WebApp, I trigger a callback function to initiate a JSON request: GmScreen.prototype.requestPcUpdate = function(id) { var currentU ...

The dimensions of the HTML table do not adjust properly when new items are being appended using JavaScript

I utilized this HTML Code to generate a table: <div class="noten_tabelle"> <table id="grades_table" style="width:100%"> <tr> <th>Subject</th> <th>Oral</th&g ...

Apologies, we are experiencing a server error. TypeError: Unable to access the 'map' property of an undefined

I'm struggling to grasp the concept of fetching external data using server-side rendering with the getServerSideProps method. In particular, I am facing difficulties with the search functionality and how to handle the returned data. As someone who is ...

In Cytoscape.js, Chrome is having trouble selecting nodes

When using cytoscape.js, I have a network where selecting a node should change the color of the inner circle from green to black. In Mozilla Browser, this works fine: However, when attempting the same network in Google Chrome, the selection doesn't w ...

Issues with the JavaScript "for in" iteration technique

I am working on a website menu that will be created using JavaScript and an array of objects as the foundation: [ {"menuName":"Contact Info","sectionName":"contacts"}, {"menuName":"Facilities","sectionName":"facilities"}, {"menuName":"Locations","se ...

Reimagining the _id Attribute in MongoDB Using JavaScript Objects

In my Express project, I am conducting the following test: it('testing club', async () => { let club = await clubDAO.create(baseClubParams); console.log(club) const resp = await http.put(`/api/user/follow/${club._id}`); isO ...

Tips for dynamically updating the condition in ng-class to apply CSS styles in AngularJS

Within my HTML table, I have a table row element (tr) that is associated with an ng-class. The 'active' class applies a CSS style to highlight the row, but only if the condition (selRole==role) is met, indicating that the selected role should be ...

How to address critical vulnerabilities found in a Vue.js project that relies on the 'vue-svg-loader' dependency, specifically impacting 'nth-check', 'css-select', and 'svgo'?

Attempting to launch a Vue version 2 project, encountered the following error: # npm audit report nth-check <2.0.1 Severity: high Inefficient Regular Expression Complexity in nth-check - https://github.com/advisories/GHSA-rp65-9cf3-cjxr fix available ...

Concealing the TinyNav Drop-Down Menu

Currently, I am utilizing TinyNav on my website and it is working wonderfully. However, due to our extensive menu system, the tinynav dropdown appears quite large. I have been attempting to figure out a way to hide all sub-menus without success. I experim ...

What strategies can I use to optimize the code for the function provided?

This function allows for the dynamic display of select tags for location selection based on employee designation. The current code functions correctly, but I believe it can be optimized further. // Function to activate different location options based on e ...

"Enhance your audio experience across all browsers with the revolutionary

I am looking for a way to play an mp3 file endlessly when the user opens my website. I need a lightweight crossbrowser solution that works in all browsers, including IE. Any suggestions? ...

Developing a custom sorting function for a React table using JSX

Struggling to find a solution to sort the rows array based on the sortBy and order state. Currently, I have a handleSort function that captures the column name and updates the sortBy state while toggling the order between "asc" and "desc". Now, I'm lo ...

Can a function be embedded within a React render method that includes a conditional statement to update the state using setState()?

My application randomly selects three values from an array found within defaultProps and then displays these values inside div elements in the return JSX. It also assigns these values to properties in the state object. I am facing a challenge where I need ...

Is there a way to customize jqwidgets jQuery grid cell classes/styles based on row ID and column name?

{ text: 'sell', datafield: 'Sales', width: '3%', columntype: 'button', filterable: false, cellsrenderer: function(row, columnfield, value, defaulthtml, columnproperties) { return &apos ...

The inner function of a functional component does not have access to the context value

My current project involves creating a component that can handle a large list of items and display them in chunks as the user scrolls. The goal is to automatically load more items as the user reaches the end of the visible list. However, I've encount ...

"Exploring the world of AngularJS and the art of TypeScript

I am facing an issue with broadcasting an array of albums to another controller. In the structure of my controllers, I have a parent controller called multimediaController and a child controller named multimediaAlbumController. Although I am sending a vari ...