File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import {
19
19
ViewChild ,
20
20
ViewEncapsulation ,
21
21
ElementRef ,
22
+ ChangeDetectionStrategy ,
22
23
} from '@angular/core' ;
23
24
import { MenuPositionX , MenuPositionY } from './menu-positions' ;
24
25
import { throwMdMenuInvalidPositionX , throwMdMenuInvalidPositionY } from './menu-errors' ;
@@ -35,6 +36,7 @@ import {ESCAPE} from '../core/keyboard/keycodes';
35
36
selector : 'md-menu, mat-menu' ,
36
37
templateUrl : 'menu.html' ,
37
38
styleUrls : [ 'menu.css' ] ,
39
+ changeDetection : ChangeDetectionStrategy . OnPush ,
38
40
encapsulation : ViewEncapsulation . None ,
39
41
animations : [
40
42
transformMenu ,
Original file line number Diff line number Diff line change 6
6
* found in the LICENSE file at https://angular.io/license
7
7
*/
8
8
9
- import { Component , ElementRef } from '@angular/core' ;
9
+ import { Component , ElementRef , ChangeDetectionStrategy } from '@angular/core' ;
10
10
import { Focusable } from '../core/a11y/focus-key-manager' ;
11
11
import { CanDisable , mixinDisabled } from '../core/common-behaviors/disabled' ;
12
12
@@ -31,8 +31,9 @@ export const _MdMenuItemMixinBase = mixinDisabled(MdMenuItemBase);
31
31
'[attr.disabled]' : 'disabled || null' ,
32
32
'(click)' : '_checkDisabled($event)' ,
33
33
} ,
34
+ changeDetection : ChangeDetectionStrategy . OnPush ,
34
35
templateUrl : 'menu-item.html' ,
35
- exportAs : 'mdMenuItem'
36
+ exportAs : 'mdMenuItem' ,
36
37
} )
37
38
export class MdMenuItem extends _MdMenuItemMixinBase implements Focusable , CanDisable {
38
39
You can’t perform that action at this time.
0 commit comments