Created
June 11, 2018 05:14
-
-
Save saurabhpati/2921d9762d1a0d2f0a86aa720ec11566 to your computer and use it in GitHub Desktop.
This is a suspiciousService
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
function suspiciousService($q) { | |
this.doVeryImportantStuff = function (options) { | |
if (options.throwException) { | |
throw 'An exception thrown as per required options.' | |
} | |
return $q.resolve({ data: 'Data without exception.' }); | |
} | |
} | |
suspiciousService.$inject = ['$q']; | |
angular | |
.module('demoModule') | |
.service('suspiciousService', suspiciousService); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment