Last active
December 27, 2016 00:28
-
-
Save jsayol/6353ee1b7629f2a4e61eb0df92fdc15f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ngOnChanges(changes: SimpleChanges): void { | |
if ('ngForIn' in changes) { | |
this.ngForOf = Object.keys(this.ngForIn); | |
const currentValue: any[] = Object.keys(changes['ngForIn'].currentValue); | |
const previousValue: any[] = Object.keys(changes['ngForIn'].previousValue); | |
changes['ngForOf'] = new SimpleChange(previousValue, currentValue); | |
super.ngOnChanges(changes); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment