My requirement is to utilize the same directive within another directive, based on a conditional parameter. However, every time I attempt to do this, it appears to enter an infinite loop. It seems like the templates are being preloaded and causing a recursive loop, resulting in the error message: "RangeError: Maximum call stack size exceeded."
I have set up a demonstration on fiddle.. If you check out the example, you'll notice that when the parameter's value is set to "1", it triggers the error (even with the second level parameter set as "2" to avoid any real recursion issues in the controller/application). https://jsfiddle.net/qh9nh1gx/
Below is the template for the "custom-directive":
<div>
<div ng-if='info==1'><div custom-directive info='2'></div></div>
<div ng-if='info==2'>DONE,single.</div>
</div>
Thank you