You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by bu...@apache.org on 2014/05/24 11:05:03 UTC
svn commit: r909796 - in /websites/staging/isis/trunk: cgi-bin/ content/
content/components/viewers/restfulobjects/angularjs-tips.html
Author: buildbot
Date: Sat May 24 09:05:03 2014
New Revision: 909796
Log:
Staging update by buildbot for isis
Modified:
websites/staging/isis/trunk/cgi-bin/ (props changed)
websites/staging/isis/trunk/content/ (props changed)
websites/staging/isis/trunk/content/components/viewers/restfulobjects/angularjs-tips.html
Propchange: websites/staging/isis/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat May 24 09:05:03 2014
@@ -1 +1 @@
-1597267
+1597268
Propchange: websites/staging/isis/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat May 24 09:05:03 2014
@@ -1 +1 @@
-1597267
+1597268
Modified: websites/staging/isis/trunk/content/components/viewers/restfulobjects/angularjs-tips.html
==============================================================================
--- websites/staging/isis/trunk/content/components/viewers/restfulobjects/angularjs-tips.html (original)
+++ websites/staging/isis/trunk/content/components/viewers/restfulobjects/angularjs-tips.html Sat May 24 09:05:03 2014
@@ -430,16 +430,14 @@
<p>You can then invoke this using AngularJs' <code>$resource</code> service as follows. </p>
-<pre><code>var findCustomerAction = $resource("http://localhost:8080/restful/services/customers/actions/findCustomer/invoke?:queryString");
-
+<pre><code>var findCustomer = $resource("http://localhost:8080/restful/services/customers/actions/findCustomer/invoke?:queryString");
var findCustomerArgs = {
"customerName": {
"value": "Fred"
}
};
-var findCustomerArgsStringified = JSON.stringify(findCustomerArgs);
-findCustomerAction.get({queryString: findCustomerArgsStringified}, function(data) { ... } )
+findCustomer.get({queryString: JSON.stringify(findCustomerArgs)}, function(data) { ... } )
</code></pre>
<p>Here the <code>:queryString</code> placeholder in the initial <code>$resource</code> constructor is expanded with a stringified version of the JSON object representing the args. Note how the <code>findCustomerArgs</code> is the same as the <code>"arguments"</code> attribute in the original link (with a value provided instead of <code>null</code>).</p>