Dhamodaran P
Dhamodaran P

Reputation: 187

How to hide or Remove title attribute of SVG element in angular 2

I have include the svg icons in my angular 2 app.While hovering the icons its show the 'Icons' title. I have used Angular SVG Icon for inline Svg to apply css styles. I want to remove those title from all the SVG icon.

<svg-icon src="images/svg/icons_date.svg" class='svg- 
icons'></svg-icon>

<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" 
viewBox="0 0 20 20"><title>icons</title><path ="M10,0A10,10,0,1,0,20,10,10,10,0,0,0,10,0Zm0,1a9,9,0,0,1,7.16,14.56v-.06a3.39,3.39,0,0,0-3.39-3.39H6.23a3.39,3.39,0,0,0-3.39,3.39v.06A9,9,0,0,1,10,1ZM3.8,16.57V15.46A2.44,2.44,0,0,1,6.23,13h7.54a2.44,2.44,0,0,1,2.44,2.44v1.11a9,9,0,0,1-12.41,0Zm6.31-5.1A4.23,4.23,0,1,0,5.87,7.24,4.24,4.24,0,0,0,10.11,11.47Zm0-7.51A3.28,3.28,0,1,1,6.83,7.24,3.28,3.28,0,0,1,10.11,4Z"></path></svg>

Is there any option to remove.

Upvotes: 0

Views: 3760

Answers (1)

Farrukh Shahzad
Farrukh Shahzad

Reputation: 51

Add the following code to your svg file.

<style>
   svg { pointer-events: none; }
</style>

Upvotes: 1

Related Questions