im trying to render a custom template using the $compile but i keep getting
unrecognized expression: {{senddata}}
My code is like below
app.controller('MainCtrl', function ($scope, ngDialog,$http,$compile){
$scope.afterasset = function (selectedValues) {
$scope.senddata = 'testdata';
var data = $compile( '{{senddata}}' )( $scope );
}
}
Any idea guys ? thanks :)