Skip to content

Instantly share code, notes, and snippets.

@raphaklaus
Created February 20, 2015 10:59
Show Gist options
  • Save raphaklaus/78c797b836f9d66b1668 to your computer and use it in GitHub Desktop.
Save raphaklaus/78c797b836f9d66b1668 to your computer and use it in GitHub Desktop.
Angular Safe Minification
//Para controllers - For controllers
app.controller("Home", ["$scope", "$http", function ($scope, $http) {
alert("Lógica aqui dentro...");
}]);
//E também para qualquer função que receba injeção de dependência. - Any function with dependency injection must consider this approach.
app.config(["$http", function ($http) {
$http.setBaseUrl('/');
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment