diff --git a/src/ng/animate.js b/src/ng/animate.js index 4dae736404b0..96df569176c8 100644 --- a/src/ng/animate.js +++ b/src/ng/animate.js @@ -54,7 +54,7 @@ function prepareAnimateOptions(options) { } var $$CoreAnimateJsProvider = function() { - this.$get = function() {}; + this.$get = noop; }; // this is prefixed with Core since it conflicts with diff --git a/src/ng/compile.js b/src/ng/compile.js index dd794eed9684..e8adc6edb7b9 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -1075,7 +1075,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { * See also {@link ng.$compileProvider#directive $compileProvider.directive()}. */ this.component = function registerComponent(name, options) { - var controller = options.controller || function() {}; + var controller = options.controller || noop; function factory($injector) { function makeInjectable(fn) { diff --git a/src/ng/parse.js b/src/ng/parse.js index b68ed7d8c458..37567b405485 100644 --- a/src/ng/parse.js +++ b/src/ng/parse.js @@ -1314,7 +1314,7 @@ ASTInterpreter.prototype = { forEach(ast.body, function(expression) { expressions.push(self.recurse(expression.expression)); }); - var fn = ast.body.length === 0 ? function() {} : + var fn = ast.body.length === 0 ? noop : ast.body.length === 1 ? expressions[0] : function(scope, locals) { var lastValue;