From c37ecb65e25dd98c15dbd39473f11329b72e9ec8 Mon Sep 17 00:00:00 2001 From: Andrew O'Brien Date: Wed, 3 Jul 2013 11:51:56 -0400 Subject: [PATCH] Makes example directive controller minification-safe I've helped a few people who were stuck on minification errors with directive controller functions. Most of them are using the first example in "Writing directives (long version)" as a quick reference. I think it would be better to emphasize that the "controller" property needs to be min safe in there, rather than further down. --- docs/content/guide/directive.ngdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/content/guide/directive.ngdoc b/docs/content/guide/directive.ngdoc index 7e0860e09fe6..57cdebfe058e 100644 --- a/docs/content/guide/directive.ngdoc +++ b/docs/content/guide/directive.ngdoc @@ -269,7 +269,8 @@ Here's an example directive declared with a Directive Definition Object: transclude: false, restrict: 'A', scope: false, - controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... }, + controller: ["$scope", "$element", "$attrs", "$transclude", "otherInjectables", + function($scope, $element, $attrs, $transclude, otherInjectables) { ... }], compile: function compile(tElement, tAttrs, transclude) { return { pre: function preLink(scope, iElement, iAttrs, controller) { ... },