Skip to content

Instantly share code, notes, and snippets.

@IlanFrumer
Created October 2, 2013 07:12
Show Gist options
  • Save IlanFrumer/6790052 to your computer and use it in GitHub Desktop.
Save IlanFrumer/6790052 to your computer and use it in GitHub Desktop.
AngularJS's DI system inspects function parameters to determine what to inject. JavaScript minifiers rename (mangle) function parameters. To overcome this, AngularJS has a "minifier-safe inline" notation.
app = angular.module('app',[])
app.controller 'myCtrl1' , ['$scope','$http','$location', ($scope, $http,$location)->
$scope.data = {}
]
app.controller 'myCtrl2' , ['$scope','$http','$location'].push ($scope, $http,$location)->
$scope.data = {}
@IlanFrumer
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment