npm install font-awesome --save
Then
Import css from .angular-cli.json
"styles": [
"styles.css",
"../node_modules/font-awesome/css/font-awesome.css"
],
Add the following style to style.css
.fontawesome {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
font-size: 24px;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
text-align: center;
}
use
<mat-icon color="primary" fontSet="fontawesome" fontIcon="fa-thumb-tack"></mat-icon>
Feng
没有评论:
发表评论