Closed jorafali closed 7 years ago
I don't think this is possible. The problem is that the SVG-tree is XML, and it doesn't support unknown elements. that means if you put the ngOutlet
in there, the SVG tree will not render anymore.
If you put the XHTML modifier on the node, it will wrap that node inside a foreignObject
. that means that whatever the router puts in there, will be in the HTML subspace, not in the SVG render tree.
The only solution that comes to mind, is to create your own router, using an SVG native element. I really hope that I'm wrong here because the idea is intriguing, and if it works, it would enable some nice tricks. Charting pops to mind, but some generative art and other fun exersizes become possible also!
@SanderElias : thanks, Would you have an idea where to start in order to create a custom router ? I really dislike the way I'm working around that issue so I'd be keen to give that a go.
Unfortunately reading the angular source code is extremely tedious for me (just BTW, anyone knows where to find some docs going a bit more in-depth with regards to what's happening under the hood in angular ? I would really love to read on that.)
In the meantime I'll experiment with extending RouterOutlet with an attribute selector and see if it does it.
@jorafali I would start off with forking ngRouterOutlet, and start from there. I suspect you might be able to use the router as is, but with a custom outlet element.
Thanks for the first issue! I'm closing based on the discussion with @SanderElias.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
Hi everybody, this is my first time reporting a bug/ asking for feature un Github. Be kind :)
[x] bug report [x] feature request [ ] support request
Current behavior if I have a parent template defining a root svg tag such as
`