import * as tslib_1 from "tslib";
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { Location } from '@angular/common';
import { CategoriesService } from './../../config/category.service';
import { ServiceService } from './../../config/service.service';
let CatagoryPage = class CatagoryPage {
    constructor(router, location, categoriesService, service) {
        this.router = router;
        this.location = location;
        this.categoriesService = categoriesService;
        this.service = service;
        this.service.get('params').then((val) => {
            this.data = val;
        });
    }
    ngOnInit() {
    }
    goToPage(path, data = null) {
        this.service.set('params', data);
        this.router.navigateByUrl(path, { queryParams: data });
        document.body.scrollTop = document.documentElement.scrollTop = 0;
    }
    goBack() {
        this.location.back();
    }
};
CatagoryPage = tslib_1.__decorate([
    Component({
        selector: 'app-catagory',
        templateUrl: './catagory.page.html',
        styleUrls: ['./catagory.page.scss'],
    }),
    tslib_1.__metadata("design:paramtypes", [Router,
        Location,
        CategoriesService,
        ServiceService])
], CatagoryPage);
export { CatagoryPage };
//# sourceMappingURL=catagory.page.js.map