function is reserved word in js
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 15 Mar 2011 13:46:04 +0000 (13:46 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 15 Mar 2011 13:46:04 +0000 (13:46 +0000)
public/gearman.html

index 7e80567..411aad3 100644 (file)
@@ -15,7 +15,7 @@
  
       this.fetch = function() {
         self.clear();
-       self.url = '/g/' + self.function + '/' + self.args + '?callback=JSON_CALLBACK';
+       self.url = '/g/' + self.function_name + '/' + self.args + '?callback=JSON_CALLBACK';
         $xhr('JSON', self.url, function(code, response) {
           self.code = code;
           self.response = response;
@@ -30,7 +30,7 @@
     GearmanCntl.$inject = ['$xhr'];
   </script>
   <div ng:controller="GearmanCntl">
-    <select name="function">
+    <select name="function_name">
     <option ng:repeat="f in g.status" ng:show="f.available" value="{{f.function}}">{{f.function}}</option>
     <input type="text" name="args"     value="127.0.0.1" size="40"/>
     <button ng:click="fetch()">fetch</button>