Last modified by Ludovic Dubost on 2015/09/01 11:50

From version 6.1
edited by Ludovic Dubost
on 2013/04/16 19:42
Change comment: There is no comment for this version
To version 1.1
edited by Ludovic Dubost
on 2013/04/16 18:57
Change comment: Import

Summary

Details

Page properties
Content
... ... @@ -1,9 +7,3 @@
1 -
2 -This is a demo of AngularJS integration with XWiki. The backend data is in XWiki and AngularJS is used to display data from XWiki.
3 -With this integration, AngularJS code can be directly editing in XWiki pages and the result is immediately visible.
4 -
5 -The code of this demo is available as an [[XWiki Extension>>http://extensions.xwiki.org/xwiki/bin/view/Extension/AngularJSDemo]] (the code is also commented there).
6 -
7 7  {{angular app="xwiki" css="1"}}
8 8  <script type="text/javascript">
9 9  angular.module('xwiki', ['ngResource'])
... ... @@ -10,7 +10,7 @@
10 10  
11 11  function XWikiSearchCtrl($scope, $resource) {
12 12   $scope.searchTerm = ""
13 - $scope.xwikiQuery = $resource('/xwiki/bin/get/Phones/PhonesLiveTableResults',
7 + $scope.xwikiQuery = $resource('/xwiki/wiki/angularjs/get/Phones/PhonesLiveTableResults',
14 14   {"doc.title":"", outputSyntax: "plain", transprefix : "phones.livetable.", classname: "Phones.PhonesClass", collist : "_image,doc.title,os,os_version,screen_size,hardware_cpu,details", offset: "1", limit: "15", reqNo: "1", sort : "doc.title", dir: "asc"},
15 15   {get:{method:'GET'}});
16 16  
... ... @@ -19,13 +19,13 @@
19 19   };
20 20  
21 21   $scope.doGet = function(docName, docDetails) {
22 - $scope.xwikiDocQuery = $resource('/xwiki/rest/wikis/ludovic/spaces/Phones/pages/:docName',
16 + $scope.xwikiDocQuery = $resource('/xwiki/rest/wikis/angularjs/spaces/Phones/pages/:docName',
23 23   {docName: "", media: "json"},
24 24   {get:{method:'GET'}});
25 - $scope.xwikiObjectQuery = $resource('/xwiki/rest/wikis/ludovic/spaces/Phones/pages/:docName/objects/Phones.PhonesClass/0',
19 + $scope.xwikiObjectQuery = $resource('/xwiki/rest/wikis/angularjs/spaces/Phones/pages/:docName/objects/Phones.PhonesClass/0',
26 26   {docName: "", media: "json"},
27 27   {get:{method:'GET'}});
28 - $scope.xwikiAttachQuery = $resource('/xwiki/rest/wikis/ludovic/spaces/Phones/pages/:docName/attachments',
22 + $scope.xwikiAttachQuery = $resource('/xwiki/rest/wikis/angularjs/spaces/Phones/pages/:docName/attachments',
29 29   {docName: "", media: "json"},
30 30   {get:{method:'GET'}});
31 31  
XWiki.StyleSheetExtension[0]
Use this extension
... ... @@ -1,1 +1,1 @@
1 -onDemand
1 +currentPage