Skip to content

Commit

Permalink
feat(module:popover): support OnPush
Browse files Browse the repository at this point in the history
change binding name
change showcases’ changeDetection to OnPush
  • Loading branch information
csyszf authored and csongysun committed Aug 27, 2017
1 parent 1fb8d6e commit d5d5293
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/popover/nz-popover.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import { NzToolTipComponent } from '../tooltip/nz-tooltip.component';
(detach)="hide()"
(positionChange)="onPositionChange($event)"
[positions]="_positions"
[open]="nzVisible">
<div class="ant-popover" [ngClass]="_classMap" [ngStyle]="nzOverlayStyle" [@fadeAnimation]="''+nzVisible"
[open]="visible$ | async">
<div class="ant-popover" [ngClass]="_classMap" [ngStyle]="nzOverlayStyle" [@fadeAnimation]="''+(visible$ | async)"
(@fadeAnimation.done)="_afterVisibilityAnimation($event)">
<div class="ant-popover-content">
<div class="ant-popover-arrow"></div>
Expand Down
3 changes: 2 additions & 1 deletion src/showcase/nz-demo-popover/nz-demo-popover.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { Component, OnInit, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';

@Component({
selector : 'nz-demo-popover',
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
templateUrl : './nz-demo-popover.html'
})

Expand Down

0 comments on commit d5d5293

Please sign in to comment.