angular / angular.js

AngularJS - HTML enhanced for web apps!
https://angularjs.org
MIT License
58.8k stars 27.48k forks source link

1.2-rc3 breaks combination of transclude and replace cause multidir error #4837

Open tardyp opened 11 years ago

tardyp commented 11 years ago

I use combination of transclude and template to implement widget inheritence (kindof)

My code started break between rc2 and rc3,

Please have a look at this plunker for an easier description of the situation http://plnkr.co/edit/igNX8j6P0xwHGQ5JvHI7?p=preview

Not sure if this is a bug, but if I use replace=true in combination with transclude and two templated widgets, I get this error:

http://docs.angularjs.org/error/$compile:multidir?p0=textfield&p1=basefield&p2=template&p3=%3Cbasefield%3E

IgorMinar commented 10 years ago

I can still reproduce this with 1.2.7

We should recognize that the second directive is coming from the nested template that is replacing the current element and not complain about double templates.