in this plunkr example, I am simply trying to create my own ng-include directive that just replaces the src attribute automatically with something else (add some extra params).
When the 'replace' attribute on the directive is 'true', it breaks with the error above. If I set it to 'false', everything is ok but then I get an extra level of nesting in my DOM, which I'm trying to avoid...
The expression that fails is:
template: '<ng-include src="src | srcizer"></ng-include>'
Is there any way to use replace=true and still create this kind of ng-include alternative?
This should work:
template: '<ng-include ng-src="src | srcizer"></ng-include>'