what is the purpose of ng-repeat in embedded widgets using sp-widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2023 06:16 AM
What is the purpose of using ng-repeat once we get the response of using spUtil.get?
HTML:
<div id="tabcontainer" ng-repeat="i in data.widgets">
<sp-widget widget="i.currentWidget"></sp-widget>
</div>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2023 06:20 AM
Hello @Ansuha Chipuri
The ng-repeat directive repeats a set of HTML, a given number of times.
The set of HTML will be repeated once per item in a collection.
The collection must be an array or an object.
If you have an collection of objects, the ng-repeat directive is perfect for making a HTML table, displaying one table row for each object, and one table data for each object property. See example below.
Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.
Regards,
Samaksh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2023 06:21 AM
Hi @Ansuha Chipuri,
It makes it easier to display several data items, without the need to define every single one of them. It makes the display of your data dynamic.
Angular ng-repeat Directive (w3schools.com)
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.