Created
October 2, 2013 07:12
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
AngularJS: Dependency Injection