angular - Converting AngularJS deffered promise to AngularX observable for JSOM -
i converting angularjs application angular 4 gets data sharepoint. using jsom , executequeryasync() method. i data executequeryasync() server , store in observable in service. code have transform old version (which not me) below. struggle syntax when converting service. have absolute no plan how convert angular 4. getallstatusreps($scope) { const deferred = $q.defer(); const ctx = sp.clientcontext.get_current(); const web = ctx.get_web(); const statuslist = web.get_lists().getbytitle(this.statuslistname); const twitterlist = web.get_lists().getbytitle(this.twitterlistname); const statreps = statuslist.getitems(this.getqueryforallstatusreps()); const twitreps = twitterlist.getitems(this.getqueryforallstatusreps()); const querytext = ` <view> <rowlimit>1</rowlimit> <viewfields>{0}</viewfields> <query> <where><isnotnull><fieldref name=...