Last active
August 29, 2015 13:56
-
-
Save LongLiveCHIEF/9320683 to your computer and use it in GitHub Desktop.
SharePoint site provider factory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.config(['spSiteProvider',function(spSiteProvider){ | |
spSiteProvider.siteSvcUrl('https://myspsite.com/_vti_bin/listdata.svc') | |
}]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.controller('theCtrl',['$http','spSite',function($http,spSite){ | |
var splist = spSite.getListData('listA').then(function(data){ | |
//do something with data | |
}) | |
}]) |
Got it! took me long enough...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
and tried adding as a prop on the
SpSite
function: