import { Component } from '@angular/core';
import { NavController, NavParams, MenuController } from 'ionic-angular';
import { SyncService } from "../../services/sync-service";

import "rxjs/add/operator/count";

@Component({
	selector: 'page-home',
  	templateUrl: 'home.html'
})
export class HomePage {

	constructor(
		public navCtrl: NavController,
		public navParams: NavParams,
		public menuCtrl: MenuController,
		public sync: SyncService
	) { }

  	ionViewDidLoad() {
		console.log('ionViewDidLoad HomePage');
		this.menuCtrl.enable(true);

		this.sync.do().subscribe(result => { 
			// result.count().subscribe(x => {
			// 	console.log(x);
				
			// });
			console.log(result);
			
			
		}, error => console.error(error));	
  	}
}