After populating a ng-grid with SharePoint items, my goal is to have the SharePoint edit form open in a modal window when the edit button at the end of each row is clicked. However, I am encountering difficulties when using OpenPopUpPage as the {{row.entity.Id}} does not update correctly and leads to a broken edit page.
Functioning Example:
{ displayName: 'Edit', cellTemplate: '<a ng-href="../lists/locations/editform.aspx?IsDlg=1&id={{row.entity.Id}}">Edit</a>' }
Opens the modal but presents incorrect ID on the edit form:
{ displayName: 'Edit', cellTemplate: '<a ng-href="#" onclick="javascript:OpenPopUpPage(\'../lists/locations/editform.aspx?IsDlg=1&id={{row.entity.Id}}\')">Edit</a>' }