Issue
I am developing an angular component. it is an avatar creater using with svg. My problem is that when I run my component in angular project it draws just a circle not other components like nose,hair,face etc. ,but when I inspect my component and copy its svg elements and paste in a svg viewer, it shows as how should it be.
As you can see, my component has svg elements but doesn't rendered in browser. But,when I use same svg elements in a viewer they are rendered.
My Component's svg elements in online svg viewer
Also, here is project's repo
Angular project version
Any help is appreciated
Solution
Problem is that, when I create components with selector tags , angular adds its own element tags to svg schema and this breasks the svg's schema and browser doesn't render it. So, I used attribute selector for achieving this problem. This SO answer help me to solve this problem.
Example project is here. You can check components under projects folder
Answered By - Barış Can Yılmaz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.