One part of my code changes the route by:
$state.go('^.DfDocuments', {
requestId: rowData.RequestID
});
However, this doesn't allow me to right click on the link and do "open in new tab".
I'd like to programatically set an a tag with a ui-sref attribute. They are being set in the rows of a jQuery datatable. I.e.
<a data-ui-sref="DfDocuments{requestId: 12155}">Asdf</a>
However, since this is coming from JavaScript (late bound?), it's not doing anything.
How can I get Angular to notice these? I believe that I need $compile or (better) $link, but not sure. Can I do those without directives?
$scope.GetMRender = function (columnId) {
switch (columnId) {
case 'Docs':
return function(data, type, row) {
return '<a ui-sref="^DfDocuments{requestId: ' + row.RequestID + '}">test</a>';
};
return null;
}
I think you are looking for $scope.apply(). See http://jimhoskins.com/2012/12/17/angularjs-and-apply.html