You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2014/05/24 11:03:29 UTC

svn commit: r1597266 - /isis/site/trunk/content/components/viewers/restfulobjects/angularjs-tips.md

Author: danhaywood
Date: Sat May 24 09:03:29 2014
New Revision: 1597266

URL: http://svn.apache.org/r1597266
Log:
angularjs tip

Modified:
    isis/site/trunk/content/components/viewers/restfulobjects/angularjs-tips.md

Modified: isis/site/trunk/content/components/viewers/restfulobjects/angularjs-tips.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/components/viewers/restfulobjects/angularjs-tips.md?rev=1597266&r1=1597265&r2=1597266&view=diff
==============================================================================
--- isis/site/trunk/content/components/viewers/restfulobjects/angularjs-tips.md (original)
+++ isis/site/trunk/content/components/viewers/restfulobjects/angularjs-tips.md Sat May 24 09:03:29 2014
@@ -8,28 +8,28 @@ This page captures one or two tips on us
 
 Suppose you have a `CustomerService` providing a `findCustomer` action:
 
-  public class CustomerService {
+    public class CustomerService {
 
-    public String id() { return "customers"; }
+      public String id() { return "customers"; }
     
-    @ActionSemantics(Of.SAFE)
-    public Customer findCustomer(@Named("customerName") String customerName) { ... }
+      @ActionSemantics(Of.SAFE)
+      public Customer findCustomer(@Named("customerName") String customerName) { ... }
   
-  }
+    }
   
 Restful Objects will expose this as action with the following link that looks something like:
 
-  {
-    "rel" : "urn:org.restfulobjects:rels/invoke",
-    "href" : "http://localhost:8080/restful/services/customers/actions/findCustomer/invoke",
-    "method" : "GET",
-    "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/action-result\"",
-    "arguments" : {
-      "customerName" : {
-        "value" : null
+    {
+      "rel" : "urn:org.restfulobjects:rels/invoke",
+      "href" : "http://localhost:8080/restful/services/customers/actions/findCustomer/invoke",
+      "method" : "GET",
+      "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/action-result\"",
+      "arguments" : {
+        "customerName" : {
+          "value" : null
+        }
       }
-    }
-  }  
+    }  
   
 You can then invoke this using AngularJs' `$resource` service as follows.