I have a directive which uses a custom jQuery Plugin, The plugin returns template html to show some list and it works good, BUT when I try to also use an AngularJs directive inside that template something like "ng-click" or one of my custom directives it just does not pick it up.
When I open the source in firebug or chrome debugger tools I can see there is no class="ng-scope" appended to that div which usually is the case in correctly working angular controlled divs. But I see this div is in hiearchialy under the main ng-app div, so I thought it must be inherited to all child divs.
Again This controller and directive works, the only NOT working part is the ng-click which I added to result template from inside the jQuery plugin. Any ideas what is the problem here?
myApp.directive("myDirective", function(){
return{
restrict: 'A',
link: function(scope, element,attrs) {
$(element).selectAutoComplete({
dataSourceDelegate: scope.dataSource1,
dataSourceObject: { value: "id", display: "title"},
resultTemplate: '<div>show some data as list</div> <div id="internalTemplate"
ng-click="doSomething()"> Show Next </div>'
});
}
}
});
and in Html
<div ng-controller="myController">
<input my-directive type="text" />
</div>