angularjsHow do I use AngularJS Material Icons in my web application?
To use AngularJS Material Icons in your web application, you'll need to include the AngularJS Material library in your HTML page.
<head>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0/angular-material.min.css">
</head>
Then add the AngularJS Material Icons module as a dependency to your AngularJS application.
angular.module('myApp', ['ngMaterial', 'ngMessages', 'material.svgAssetsCache']);
Next, you can use the md-icon
directive to display icons in your application.
<md-icon md-svg-icon="my-icon"></md-icon>
The md-svg-icon
attribute tells AngularJS Material which icon to display. You can also set the icon size with the md-font-set
attribute.
<md-icon md-svg-icon="my-icon" md-font-set="my-iconset"></md-icon>
You can also use the md-icon-button
directive to display an icon button.
<md-icon-button md-svg-icon="my-icon" aria-label="My Icon Button"></md-icon-button>
For more information, see the AngularJS Material Icons Documentation.
More of Angularjs
- How do I format a date in AngularJS?
- How can I become an Angular expert from a beginner level?
- How can I use Angular to zoom in and out of a div?
- How do I use Angular Zone to run my code?
- How can I use Angular and Zorro together to create a software application?
- How do I use Angular to zip files?
- How do I use the AngularJS Wiki to find information about software development?
- How can I use Angular to zoom in on an image?
- How do I integrate an Angular Yandex Map into my software development project?
- How can I use the Yandex Map API with AngularJS?
See more codes...