Changes for page Phone Search with AngularJS
Last modified by Ludovic Dubost on 2015/09/01 11:50
To version 5.1
edited by Ludovic Dubost
on 2013/04/16 19:29
on 2013/04/16 19:29
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,3 +1,9 @@ 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 visible there). 6 + 1 1 {{angular app="xwiki" css="1"}} 2 2 <script type="text/javascript"> 3 3 angular.module('xwiki', ['ngResource']) ... ... @@ -4,7 +4,7 @@ 4 4 5 5 function XWikiSearchCtrl($scope, $resource) { 6 6 $scope.searchTerm = "" 7 - $scope.xwikiQuery = $resource('/xwiki/ wiki/angularjs/get/Phones/PhonesLiveTableResults',13 + $scope.xwikiQuery = $resource('/xwiki/bin/get/Phones/PhonesLiveTableResults', 8 8 {"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"}, 9 9 {get:{method:'GET'}}); 10 10 ... ... @@ -13,13 +13,13 @@ 13 13 }; 14 14 15 15 $scope.doGet = function(docName, docDetails) { 16 - $scope.xwikiDocQuery = $resource('/xwiki/rest/wikis/ angularjs/spaces/Phones/pages/:docName',22 + $scope.xwikiDocQuery = $resource('/xwiki/rest/wikis/ludovic/spaces/Phones/pages/:docName', 17 17 {docName: "", media: "json"}, 18 18 {get:{method:'GET'}}); 19 - $scope.xwikiObjectQuery = $resource('/xwiki/rest/wikis/ angularjs/spaces/Phones/pages/:docName/objects/Phones.PhonesClass/0',25 + $scope.xwikiObjectQuery = $resource('/xwiki/rest/wikis/ludovic/spaces/Phones/pages/:docName/objects/Phones.PhonesClass/0', 20 20 {docName: "", media: "json"}, 21 21 {get:{method:'GET'}}); 22 - $scope.xwikiAttachQuery = $resource('/xwiki/rest/wikis/ angularjs/spaces/Phones/pages/:docName/attachments',28 + $scope.xwikiAttachQuery = $resource('/xwiki/rest/wikis/ludovic/spaces/Phones/pages/:docName/attachments', 23 23 {docName: "", media: "json"}, 24 24 {get:{method:'GET'}}); 25 25
- XWiki.StyleSheetExtension[0]
-
- Use this extension
-
... ... @@ -1,1 +1,1 @@ 1 - currentPage1 +onDemand