Comitting before pulling Picture service

This commit is contained in:
Whizel 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) { } constructor(private http: HttpClient) { }
postData(data: any) { postData(data: any) {
console.log('logged data is', data);
let options = this.createRequestOptions(); let options = this.createRequestOptions();
return this.http.post(this.serverUrl, { data }, { headers: options }); return this.http.post(this.serverUrl, { data }, { headers: options });
} }