Comitting before pulling Picture service

This commit is contained in:
Viktor Søndergaard 2019-04-06 20:39:28 +02:00
parent b7d7cbcdb3
commit 57352c3763
2 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1,15 @@
import { Injectable } from '@angular/core';
import * as power from 'nativescript-powerinfo'
@Injectable({
providedIn: 'root'
})
export class MyBatteryInfoService {
constructor() { }
public getPowerPercent (): number {
power.startPowerUpdates(function(Info) {
power.stopPowerUpdates();
return Info.percentage;
})
}

View File

@ -10,7 +10,6 @@ export class MyHttpPostService {
constructor(private http: HttpClient) { }
postData(data: any) {
console.log('logged data is', data);
let options = this.createRequestOptions();
return this.http.post(this.serverUrl, { data }, { headers: options });
}