1

I am using Lightning in salesforce along with angular. I have below object

[{"day":"Wednesday, June 28th 2017"},{"day":"Thursday, June 29th 2017"},{"day":"Friday, June 30th 2017"},{"day":"Saturday, July 1st 2017"},{"day":"Sunday, July 2nd 2017"}]

I want to display this inside a nested table I tried below code.

<table ng-app="salesApp" ng-controller="MainCtrl">
            <tr ng-repeat="r in rows">
<td>
<table><tr><td>{{r.day}}</td></tr></table>
</td>
</tr></table>

Since I have nested table I guess I am losing the row data. I cannot put the ng-repeat inside the nested table so it has to be on the outer table. Any solution for this?

4
  • I would expect that to render. Check the JavaScript console for errors. See Requirements Checklist for cautions about mixing Lightning and Angular. Doesn't make much sense (as their capabilities overlap/interfere) unless you already have a large amount of Angular code already written.
    – Keith C
    Jun 26, 2017 at 17:27
  • If I put r.day in outer table then it works fine. So may be its an issue where angular may be creating its own view for the new table? Jun 26, 2017 at 17:43
  • Well ng-repeat duplicates the DOM element and its nested elements so not sure why the nested table makes a difference.
    – Keith C
    Jun 26, 2017 at 17:50
  • This does render in jsfiddle - so yeah, mixing angular + lightning, not a good idea. jsfiddle.net/gp6vgtt4/1 Jun 26, 2017 at 18:32

0

You must log in to answer this question.

Browse other questions tagged .