Skip to content

Commit

Permalink
Merge pull request #67 from SangKa/fix-timeline-dynamic-render-issues
Browse files Browse the repository at this point in the history
fix(timeline): eliminate ExpressionChangedAfterItHasBeenCheckedError …
  • Loading branch information
vthinkxie authored Aug 17, 2017
2 parents 24b4c03 + 67df061 commit 5f861bd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/timeline/nz-timeline.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ export class NzTimelineComponent implements OnInit, AfterContentInit {
}

ngAfterContentInit() {
if (this._listOfTimeline && this._listOfTimeline.length) {
const listArray = this._listOfTimeline.toArray();
listArray[ listArray.length - 1 ]._lastItem = true;
}
setTimeout(_ => {
if (this._listOfTimeline && this._listOfTimeline.length) {
const listArray = this._listOfTimeline.toArray();
listArray[ listArray.length - 1 ]._lastItem = true;
}
});
}
}

0 comments on commit 5f861bd

Please sign in to comment.