如何在 angular material 中包含 <md-icon> 上的 svg 图标
how to include the svg icons on <md-icon> in angular material
在html
<md-button class="md-fab md-primary" aria-label="Use Android">
<md-icon md-svg-src="img/icons/andriod.svg">
</md-icon></md-button>
在上面 html 我正在使用 angular 添加 svg 图像到 fab 按钮 material.but 不幸的是它显示错误无法获取 /img/icons/andriod.svg。我在同一目录中指定了图标的路径,其中 html 是 located.Is 是否需要添加更多依赖项以获得图标的影响?
我是 angular material 的新手。谁能帮帮我。
I specified the path of the icon in my same directory where html is
located
如果您的 svg
与 html 位于同一目录中,那么 LOC
是否应该从
更改
<md-icon md-svg-src="img/icons/andriod.svg">
到
<md-icon md-svg-src="/andriod.svg">
在html
<md-button class="md-fab md-primary" aria-label="Use Android">
<md-icon md-svg-src="img/icons/andriod.svg">
</md-icon></md-button>
在上面 html 我正在使用 angular 添加 svg 图像到 fab 按钮 material.but 不幸的是它显示错误无法获取 /img/icons/andriod.svg。我在同一目录中指定了图标的路径,其中 html 是 located.Is 是否需要添加更多依赖项以获得图标的影响?
我是 angular material 的新手。谁能帮帮我。
I specified the path of the icon in my same directory where html is located
如果您的 svg
与 html 位于同一目录中,那么 LOC
是否应该从
<md-icon md-svg-src="img/icons/andriod.svg">
到
<md-icon md-svg-src="/andriod.svg">