File tree Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 1
1
< section >
2
- < h2 > Home icon (Ligature from Material Icons font )</ h2 >
3
- < md-icon color ="primary " aria-label =" Home " > home </ md-icon >
2
+ < h2 > Fingerprint icon (Decorative icons )</ h2 >
3
+ < md-icon color ="primary "> fingerprint </ md-icon >
4
4
</ section >
5
5
6
6
< section >
7
- < h2 > Thumb up icon (Icon registered with MdIconProvider) </ h2 >
8
- < md-icon svgIcon ="thumb-up " color ="accent " aria-label ="Thumb up "> </ md-icon >
7
+ < h2 > Delete icon (Interactive icons) </ h2 >
8
+ < button md-icon-button aria-label ="Delete " (click) ="deleteIcon() ">
9
+ < md-icon color ="accent "> delete</ md-icon >
10
+ </ button >
9
11
</ section >
10
12
11
13
< section >
12
- < h2 > Alarm icon (Icon from icon set) </ h2 >
13
- < md-icon svgIcon ="core:accessibility " color ="warn " aria-label ="Alarm "> </ md-icon >
14
+ < h2 > Done icon (Indicator icons) </ h2 >
15
+ < md-icon color ="warn "> done</ md-icon >
16
+ < span class ="cdk-visually-hidden "> Done</ span >
14
17
</ section >
Original file line number Diff line number Diff line change 1
1
import { Component , ViewEncapsulation } from '@angular/core' ;
2
- import { DomSanitizer } from '@angular/platform-browser' ;
3
- import { MdIconRegistry } from '@angular/material' ;
2
+ import { MdSnackBar } from '@angular/material' ;
4
3
5
4
@Component ( {
6
5
moduleId : module . id ,
@@ -9,11 +8,9 @@ import {MdIconRegistry} from '@angular/material';
9
8
encapsulation : ViewEncapsulation . None ,
10
9
} )
11
10
export class IconAccessibilityDemo {
12
- constructor ( mdIconRegistry : MdIconRegistry , sanitizer : DomSanitizer ) {
13
- mdIconRegistry
14
- . addSvgIcon ( 'thumb-up' ,
15
- sanitizer . bypassSecurityTrustResourceUrl ( '/icon/assets/thumbup-icon.svg' ) )
16
- . addSvgIconSetInNamespace ( 'core' ,
17
- sanitizer . bypassSecurityTrustResourceUrl ( '/icon/assets/core-icon-set.svg' ) ) ;
11
+ constructor ( private snackBar : MdSnackBar ) { }
12
+
13
+ deleteIcon ( ) {
14
+ this . snackBar . open ( 'Item deleted' , '' , { duration : 2000 } ) ;
18
15
}
19
16
}
You can’t perform that action at this time.
0 commit comments