0.1.7 • Published 11 years ago
ngbrowserify v0.1.7
ngbrowserify
Angular function injection to array injection transform for browserify.
browserify -t ngbrowserify main.js -o main.bundle.js
Or use it from the command-line instead of ngmin:
ngbmin < input.js > output.js
Example input:
angular.module('m').factory('f',
function($rootScope, $http) {
// code
});
Output:
angular.module('m').factory('f',
['$rootScope', '$http', function($rootScope, $http) {
// code
}]);
alternate syntax
Named function expressions that end with '$ng' will always be transformed.
var factory = function myModule$ng($scope, $http) {
};
angular.module('m').factory('f', factory);
var factory = [$scope, $http, function myModule$ng($scope, $http) {
}];
angular.module('m').factory('f', factory);