.directive('mydirective', [function($scope, $document,windowService) {
return{
link : function(scope,element,attars){
--- Some more code —--
var containers = $('.container’);
containers.bind('click', function(event) {
var elem = event.currentTarget;
elem.append('<div>test</div>’); //Appending is failing
});
}
}]);
TypeError: 'undefined' is not a function (evaluating 'elem.append('<div>test</div>')')
Я только начинаю с AngularJS и придерживается вышеуказанной проблемы, я пытаюсь добавить div в контейнер.Как добавить динамический div в AngularJS?