Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular UI-Router Can ui-view replace the original tag?

I want to be able to replace the original element tag with the template. This should basically operate the same as transclusion when using the "replace=true" property.

like image 331
CMCDragonkai Avatar asked Feb 28 '14 20:02

CMCDragonkai


1 Answers

So in AngularJS 1.3 replace is getting deprecated because it is very hard to resolve that type of logic in all situations with all the different attributes for elements. There are other stackoverflow articles that cover that topic better then I can.

What we had to eventually do is write a custom attribute parser to handle each element we wanted to do that with on an element by element basis but we had to have the DOM in a certain manner for ARIA support and being able to manage some existing code bases.

I guess my real question is why are you trying to do this because that would help me give you a better answer.

like image 160
James Avatar answered Nov 16 '22 01:11

James