Skip to content
Dean Sofer edited this page Aug 30, 2013 · 6 revisions
  1. Start prefixing your directives and services if you plan to release them. You should only feel inclined to ignore them WITHIN YOUR OWN APP. Checkout ui-alias to make life easier.
  2. Stop wrapping element inside of $(). It's redundant.
  3. Start using $scope, $element, and $attrs as your linking function signature. These are the OFFICIAL injectable names, lets prevent confusion and inconsistency.
  4. Stop forgetting to setup a $scope.$on('$destroy', ...) listener in your directives.
  5. Stop doing if (!$scope.$$phase) $scope.$apply(), it means your $scope.$apply() isn't high enough in the call stack.
  6. Stop using jQuery to generate templates
  7. Stop releasing the same plugin 8 other people released. Learn to fork and pull request instead.
  8. Stop complaining about the docs without submitting a patch. They suck, we know.
Clone this wiki locally