...
This commit is contained in:
parent
b8405c728a
commit
442f147359
|
@ -1,15 +1,15 @@
|
|||
import { IError } from "../../interfaces/IError";
|
||||
import * as angular from 'angular';
|
||||
import { IWebPartContext } from '@microsoft/sp-webpart-base';
|
||||
import { ServiceKey, ServiceScope } from '@microsoft/sp-core-library';
|
||||
|
||||
|
||||
export class BaseService {
|
||||
public static $inject: string[] = ["$http", "$q", "pageContext"];
|
||||
public static $inject: string[] = ["$http", "$q"];
|
||||
public baseUrl: string;
|
||||
|
||||
constructor(private $http: ng.IHttpService, private $q: ng.IQService, private pageContext:any) {
|
||||
this.baseUrl = pageContext.web.absoluteUrl;
|
||||
constructor(private $http: ng.IHttpService, private $q: ng.IQService) {
|
||||
|
||||
this.baseUrl = (<any>window)._spPageContextInfo.webAbsoluteUrl;
|
||||
|
||||
}
|
||||
|
||||
public getRequest(query?: string, endPoint?: string): ng.IPromise<any> {
|
||||
|
|
Loading…
Reference in New Issue