Skip to content

Instantly share code, notes, and snippets.

@capaj
Created May 27, 2015 09:07
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save capaj/d15a53395c73f545b362 to your computer and use it in GitHub Desktop.
Save capaj/d15a53395c73f545b362 to your computer and use it in GitHub Desktop.
useful config for your angular apps
app.config(function($compileProvider) {
if (!location.host.match(/localhost/)) {
$compileProvider.debugInfoEnabled(false);
}
})
@prettycode
Copy link

Shouldn't $window be injected and $window.location be used instead, for testing?

EDIT: Never mind, you can't do that in config().

@Martinspire
Copy link

Would be better Angular indeed, but this also works i guess. I'm mostly working with a port on localhost, so i can also check it that way.

But my uglifyer will also remove all console logs so thats no big deal either

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