Nested directives break angular
问题 Whenever I use a directive within itself, the page freezes, and eats up more and more CPU and RAM until the tab hangs. What I have is this Application.Directives.directive('somed', function() { return { restrict: 'E', // Load the template from a separate HTML file templateUrl: 'directives/somed/view.html', replace: true }; }); and template like <div ng-if="nonexistent"> <somed></somed> </div> Which should never load the nested directive (the ng-if evaluates to false, so no content is shown.