import { Component, OnInit } from '@angular/core';
import { CurrentDeviceService } from '@iotize/ionic';
import { ActivatedRoute } from '@angular/router';

@Component({
  selector: '<%= dasherize(name) %>',
  templateUrl: './<%= dasherize(name) %>.component.html',
  styleUrls: ['./<%= dasherize(name) %>.component.scss'],
})
export class <%= classify(name) %>Component implements OnInit {
  returnUrl: string;

  public get tap(){
    return this.tapService.tap;
  }

  constructor(private tapService: CurrentDeviceService
    , private route: ActivatedRoute) {
  }

  async ngOnInit() {
    this.returnUrl = this.route.snapshot.queryParams['returnUrl'] || '/device';
  }

}
