The text of this article is not in this database — only its details are. Read it on the old site: Angular JS + Rest API + Getting List Data in SharePoint 2013
22 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.

shima sbtPosted Jan 22, 2018, 3:49 AM
When I change the 'InfoList' to any other lists, it doesnt work. could you help me?
WNC RunnersPosted Oct 6, 2017, 3:04 PM
I cannot get this to bind any custom columns. It will bind the out of the box columns (Title, Created, Modified, etc..) but will not bind Employee or Company.
Mahesh BabuPosted Apr 7, 2017, 5:15 AM
I have tried and it got worked for me...Thank you very much..
Jean BarrosPosted Sep 27, 2016, 4:26 PM
Just added: "text / javascript" in the <script> and is running now.
Jean BarrosPosted Sep 27, 2016, 2:25 PM
Hi Sagar Pardeshi. Thank you for this post. It saved my time, but i have a trouble. Just works on edit mode. After save the page changes, the data go away and i get that screen, like did say ASWIN KUMAR. Could you help me please?
Prashant VermaPosted Mar 9, 2016, 10:08 AM
great
ASWIN KUMARPosted Dec 11, 2015, 12:02 AM
Also i have deactivated the MDS Feature as well
ASWIN KUMARPosted Dec 11, 2015, 12:02 AM
I am also getting the same screen as described by Pallavi Sharma. only the Green table header with one row displaying {{customer.Title}} {{customer.Employee}} {{customer.Company}}.
phanikumar peramPosted Nov 17, 2015, 12:35 AM
appWebUrl is not defined
phanikumar peramPosted Nov 17, 2015, 12:34 AM
Mixed Content: The page at 'https://xtz-cbfd9be9b97d93.sharepoint.com/sites/Develo…orporated%2Dcbfd9be9b97d93%2Esharepoint%2Ecom%2Fsites%2FDeveloper%2FTest22' was loaded over HTTPS, but requested an insecure script 'http://code.jquery.com/ui/1.10.3/jquery-ui.min.js'. This request has been blocked; the content must be served over HTTPS.
Sagar PardeshiPosted Nov 10, 2015, 7:10 AM
check ur message box
phanikumar peramPosted Nov 10, 2015, 6:24 AM
Hii sagar,thank you for ur post but i am not able to bind the list data in sp i found that ng-controller cannot call the script controller so please clarify my doubt
phanikumar peramPosted Nov 10, 2015, 6:23 AM
hii
gopal yadavPosted Nov 10, 2015, 4:35 AM
<script type="text/javascript"> var myAngApp=angular.module('SharePointAngApp',[]); myAngApp.controller('spCustomerController', function ($scope, $http) { alert("shadfshkdg"); $http({ method: 'GET', url: appWebUrl + "/_api/SP.AppContextSite(@TargetSite)/web/lists/getByTitle('angularsp_P')/items?$select=Title,Id,Employee Name,Year Of Experiance,Salary,variable,Pay Percentage,Monthly Gross Pay&@TargetSite='" + targetSiteUrl + "'", headers: { "Accept": "application/json;odata=verbose" } }).success(function (data, status, headers, config) { alert("s"); $scope.customers = data.d.results; }).error(function (data, status, headers, config) { alert('f'); }); }); var appWebUrl = ""; var targetSiteUrl = ""; var ready = false; $(document).ready(function () { var params = document.URL.split("?")[1].split("&"); for (var i = 0; i < params.length; i = i + 1) { var param = params[i].split("="); switch (param[0]) { case "SPAppWebUrl": appWebUrl = decodeURIComponent(param[1]); break; case "SPHostUrl": targetSiteUrl = decodeURIComponent(param[1]); break; } } // load the request executor script, once ready set a flag that can be used to check against later $.getScript(appWebUrl + "/_layouts/15/SP.RequestExecutor.js", function () { ready = true; }); }); </script>
gopal yadavPosted Nov 10, 2015, 4:21 AM
Controller not able to call
mesut demirPosted Dec 28, 2014, 1:48 PM
change the compatible mode to IE version 9 or higher ( F12, then Emulation , then change to 9 or 10 --> you find the emulation on the left side, scrolling to last tab).
Pallavi SharmaPosted Nov 18, 2014, 12:08 AM
I get only the Green table header with one row displaying {{customer.Title}} {{customer.Employee}} {{customer.Company}}