📜  角材质-图标

📅  最后修改于: 2020-10-28 04:58:56             🧑  作者: Mango


md-icon是Angular指令,是在应用程序中显示基于矢量的图标的组件。除了使用Google材质图标之外,它还支持图标字体和SVG图标。

属性

下表列出了md-icon的不同属性的参数和说明。

Sr.No Parameter & Description
1

* md-font-icon

This is the string name of CSS icon associated with the font-face, which will be used to render the icon. Requires the fonts and the named CSS styles to be preloaded.

2

* md-font-set

This is the CSS style name associated with the font library, which will be assigned as the class for the font-icon ligature. This value may also be an alias that is used to lookup the classname; internally use $mdIconProvider.fontSet() to determine the style name.

3

* md-svg-src

This is the String URL (or expression) used to load, cache, and display an external SVG.

4

* md-svg-icon

This is the string name used for lookup of the icon from the internal cache; interpolated strings or expressions may also be used. Specific set names can be used with the syntax :. To use icon sets, developers are required to pre-register the sets using the $mdIconProvider service.

5

aria-label

This labels icon for accessibility. If an empty string is provided, icon will be hidden from accessibility layer with aria-hidden = “true”. If there’s no aria-label on the icon nor a label on the parent element, a warning will be logged to the console.

6

alt

This labels icon for accessibility. If an empty string is provided, icon will be hidden from accessibility layer with aria-hidden = “true”. If there’s no alt on the icon nor a label on the parent element, a warning will be logged to the console.

以下示例显示了md-icons指令的使用以及图标的使用。

am_icons.htm


      
      
      
      
      
      
      
      
                 
   
   
    
      
{{ font.name }}

结果

验证结果。