Last active
May 9, 2016 23:56
-
-
Save miguelfrias/08f5d36a3b1fe668ae97fc180d73a1c2 to your computer and use it in GitHub Desktop.
Angular Tips
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
## Performance | |
- [Disable Debug Data](https://docs.angularjs.org/guide/production#disabling-debug-data) | |
- Use track by in every ng-repeat | |
## Cleaning | |
AngularJS does some work on your behalf, but not all. The following need to be manually cleaned up: | |
- Any watchers that are not bound to the current scope (e.g. bound to $rootScope) | |
- Intervals | |
- Timeouts | |
- Variables referencing DOM in directives | |
- Dodgy jQuery plugins, e.g. those that don’t have handlers reacting to the JavaScript $destroy event | |
## More | |
http://www.slideshare.net/futureinsights/angular-performance-then-now-and-the-future-todd-motto/57-avoidingDOMltersfunction_SomeCtrllter_date_passed_in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment