Skip to content

Instantly share code, notes, and snippets.

@miguelfrias
Last active May 9, 2016 23:56
Show Gist options
  • Save miguelfrias/08f5d36a3b1fe668ae97fc180d73a1c2 to your computer and use it in GitHub Desktop.
Save miguelfrias/08f5d36a3b1fe668ae97fc180d73a1c2 to your computer and use it in GitHub Desktop.
Angular Tips
## 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