I am currently managing an older AngularJS application (v1.3.8).
Why is the demo application showing me this error?
The directive 'handleTable' template must have only one root element.
sandbox.html
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.js"></script>
<script src="sandbox.js"></script>
</head>
<body ng-app="myApp">
<handle-table></handle-table>
</body>
</html>
sandbox.js
var app = angular.module("myApp", []);
app.directive('handleTable', function() {
return {
restrict: 'E',
replace: true,
template: 'hello world'
};
});
A bug has been reported here : Template must have exactly one root element with custom directive replace: true However, it seems to be specifically related to the table/tr/td
elements.