I have a directive in angularjs, and success to use it like below:
<div my-directive my-data="{}"></div>
can show <div>Hello</div>
When I load it from an ajax call. For example, my data returned from ajax call:
$scope.ajaxData = {title: 'Title', data = '<div>load from directive like this: <div <div my-directive my-data="{}"></div></div>'}
and in my template.
<div>Title: <span>{{ajaxData.title}}</span></div>
<div ng-bind-html="ajaxData.data"></div>
But it not bind to directive, just show html code:
<div my-directive my-data="{}"></div>
Would you please tell me how to bind the directive from text like my case
Thank you very much.