This repository was archived by the owner on Oct 7, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 3
3
Component ,
4
4
Directive ,
5
5
ElementRef ,
6
- Input
6
+ Input ,
7
+ OnDestroy
7
8
} from '@angular/core' ;
8
9
import { MdcRipple } from '@angular-mdc/web/ripple' ;
9
10
@@ -50,13 +51,17 @@ export class MdcTopAppBarSection {
50
51
} ,
51
52
providers : [ MdcRipple ]
52
53
} )
53
- export class MdcTopAppBarActionItem {
54
+ export class MdcTopAppBarActionItem implements OnDestroy {
54
55
constructor (
55
56
public elementRef : ElementRef < HTMLElement > ,
56
57
private _ripple : MdcRipple ) {
57
58
58
59
_ripple . attachTo ( this . elementRef . nativeElement , true ) ;
59
60
}
61
+
62
+ ngOnDestroy ( ) : void {
63
+ this . _ripple . destroy ( ) ;
64
+ }
60
65
}
61
66
62
67
@Directive ( {
@@ -68,7 +73,7 @@ export class MdcTopAppBarActionItem {
68
73
} ,
69
74
providers : [ MdcRipple ]
70
75
} )
71
- export class MdcTopAppBarNavigationIcon {
76
+ export class MdcTopAppBarNavigationIcon implements OnDestroy {
72
77
constructor (
73
78
public elementRef : ElementRef < HTMLElement > ,
74
79
private _ripple : MdcRipple ) {
@@ -80,6 +85,10 @@ export class MdcTopAppBarNavigationIcon {
80
85
getHostElement ( ) {
81
86
return this . elementRef . nativeElement ;
82
87
}
88
+
89
+ ngOnDestroy ( ) : void {
90
+ this . _ripple . destroy ( ) ;
91
+ }
83
92
}
84
93
85
94
@Directive ( {
You can’t perform that action at this time.
0 commit comments