Skip to content

Commit

Permalink
chore: test with cdr
Browse files Browse the repository at this point in the history
  • Loading branch information
Wendell Hu committed Mar 10, 2020
1 parent d62c8f4 commit 886055a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 4 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,5 +231,8 @@
"@schematics/angular:directive": {
"prefix": "app"
}
},
"cli": {
"analytics": false
}
}
}
9 changes: 6 additions & 3 deletions components/message/message-container.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,14 @@ export class NzMessageContainerComponent implements OnInit, OnDestroy {
message.options = this.mergeMessageOptions(message.options);
message.onClose = new Subject<boolean>();
this.messages = [...this.messages, message];
console.log('debug messages length', this.messages);

const cdr = this.cdr;

console.log('debug messages length', this.messages, cdr);

// Bug should happen here. messages get updated but change detection failed.
this.cdr.detectChanges();
this.cdr.markForCheck();
cdr.detectChanges();
cdr.markForCheck();
}

/**
Expand Down

0 comments on commit 886055a

Please sign in to comment.