split controller and rename it
[angular-mojolicious.git] / public / app / conference / symposiums.js
diff --git a/public/app/conference/symposiums.js b/public/app/conference/symposiums.js
new file mode 100644 (file)
index 0000000..7502e76
--- /dev/null
@@ -0,0 +1,20 @@
+
+Symposiums.$inject = ['$xhr', '$route']; 
+
+function Symposiums(xhr, route){ 
+
+       this.route = route; 
+       this.xhr = xhr; 
+
+       var data = {}
+       this.data = data;
+
+       this.xhr("JSON"
+               , "http://localhost:5984/conference/_design/symposium/_view/work_nr%2Ctitle?callback=JSON_CALLBACK"
+               , function(code, response){ 
+                       console.log(code, response, data);
+                       data.response = response;
+               }
+       ); 
+}
+