fork download
  1. (function(){
  2. "use strict";
  3.  
  4. angular
  5. .module("myUtility")
  6. .factory("myUtility", myUtility);
  7.  
  8. myUtility.$inject = [
  9.  
  10. ];
  11.  
  12. function myUtility(
  13.  
  14. ) {
  15. var service = {
  16. rand: randomInteger
  17. };
  18. return service;
  19.  
  20. function randomInteger(min, max) {
  21. var rand = min + Math.random() * (max + 1 - min);
  22. rand = Math.floor(rand);
  23. return rand;
  24. }
  25. }
  26. })();
Runtime error #stdin #stdout #stderr 0s 107072KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
prog.js:4:2 ReferenceError: angular is not defined