Created
January 8, 2015 10:58
-
-
Save matthieuh/a655355d44dea6a16426 to your computer and use it in GitHub Desktop.
Check if angular controller exist
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
controllerExist = (controllerStrg) -> | |
try | |
$controller controllerStrg | |
return false | |
catch error | |
return !(error instanceof TypeError) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment