This repository was archived by the owner on Apr 12, 2024. It is now read-only.
"Object #<Comment> has no method 'setAttribute'" for interpolated attribute of transcluded directive #3868
Closed
Description
When a directive is set to {transcluded:'element'} and it uses a interpolated attribute value, an exception is thrown with message: TypeError: Object # has no method 'setAttribute'.
It is tested against angular.min.js v1.2.0-rc1.
Here is sample directive test page:
<!doctype html>
<html ng-app="testApp">
<head>
<script type="text/javascript" src="http://code.angularjs.org/1.2.0rc1/angular.min.js"></script>
<script language='javascript'>
angular.module('testApp', [])
.directive('ngTest', function(){
return {
transclude: 'element',
scope: { ngTest:'@' }
}
});
</script>
</head>
<body>
<div ng-test="test{{var}}"></div>
</body>
</html>
Is there something wrong? thanks