Created
February 26, 2019 16:38
-
-
Save pankajparkar/e394e6f1b4ee0febfdc95cce12aab741 to your computer and use it in GitHub Desktop.
change-detection.js
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
//network Call | |
getDataFromServer().then(()=> { | |
//state has changed | |
detectChanges(); | |
}) | |
//timeout function | |
setTimeout(()=> { | |
//Call change detection | |
detectChanges(); | |
}, 5000) | |
element.addEventListner('click', (event) =>{ | |
//state could have change | |
detectChanges(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment