This commit is contained in:
Simon-Pierre Plante 2017-07-23 23:03:13 -04:00
parent b8405c728a
commit 442f147359
1 changed files with 5 additions and 5 deletions

View File

@ -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> {