Routing breaks SVG rendering
See original GitHub issueI’m submitting a … (check one with “x”)
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Updates sugessted by @vicb
Current behavior When using the component router the svg inside a template does not render correctly, in this case the text and path is not shown.
Expected/desired behavior Should show a rendered svg text like: https://developer.mozilla.org/de/docs/Web/SVG/Element/textPath codepen
Reproduction of the problem Minimal none working plunker With routing-outlet
Minimal working plunker when router outlet it commented out at line [66-71] in app.ts commented out routing-outlet
What is the expected behavior? When using the component router with a router-outlet the SVG stops rendering correctly. The issue here ist that the SVG path and textpath does not have coordinates .
What is the motivation / use case for changing the behavior? Create an svg with with the Angular framework and use D3 only as layout engine.
Please tell us about your environment:
- Angular version: 2.0.0-rc.X
- Browser: [ Chrome XX | Firefox XX ]
- Language: [ TypeScript ]
Old description Reproduction of the problem Starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
Using the provided plunker the svg renders correctly: http://plnkr.co/edit/QTC26b1KRSbLinutw6D0?p=preview
Using the router example from the docs ROUTING & NAVIGATION and adding the svg snippet to app/app.component.ts then the rendering of the svg breaks: http://plnkr.co/edit/KPzL8CeQ3K8k5CLr3yE6?p=preview
When removing the router completely then the rendering works again: http://plnkr.co/edit/wyhPaJHl1i2rNrXfD57h?p=preview
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:9 (3 by maintainers)
Have you tried to configure
<base href="...">
so that it works with SVG and configure the router by providingAPP_BASE_HREF
?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.