Created
May 27, 2015 09:07
-
-
Save capaj/d15a53395c73f545b362 to your computer and use it in GitHub Desktop.
useful config for your angular apps
This file contains hidden or 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.config(function($compileProvider) { | |
if (!location.host.match(/localhost/)) { | |
$compileProvider.debugInfoEnabled(false); | |
} | |
}) |
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
Shouldn't
$window
be injected and$window.location
be used instead, for testing?EDIT: Never mind, you can't do that in
config()
.