Posts

Showing posts with the label Site Templates

List of All Site Templates with REST API and AngularJS

Here is the code which can show you how to display all site templates / custom templates with use of REST API & AngularJS in SharePoint : <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.1/angular.min.js"></script>  <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>        <script>          var myAngApp = angular.module('SPAngGetSiteTemplate', []);          myAngApp.controller('SPAngGetSiteTemplateController', function ($scope, $http) {              $http({                  method: 'GET',                  url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/getavailablewebtemplates(1033)?$orderby=Title",                  headers: { "Accept": "application/json;odata=verbose" }              }).success(function (data, status, headers, config) {                  $scope.customers = data.d.results;              }).error(function (data,