I have a custom directive and rendering that directive using ng-repeat. what I need is I want to compile interpolation before passing into my custom directive.
Find plnkr below
https://plnkr.co/edit/bjdBSKCFPhgbE2aREupy?p=preview
Here I want to compile interpolation in this code <display-id mycompile id={{op.id}}> </display-id>
using mycompile directive.
app.directive('mycompile', function ($compile, $interpolate) {
return {
restrict: 'EA',
replace: true,
compile: function ($scope, $elm, $attrs) {
return {
pre: function ($scope, $elm, $attrs) {
$interpolate($elm[0])($scope);
}
}
}
}
})