Compare commits
2 Commits
1d6b30edff
...
da7e193219
Author | SHA1 | Date | |
---|---|---|---|
da7e193219 | |||
31f9b48bd7 |
@ -1,6 +1,6 @@
|
|||||||
import {Component, HostListener} from '@angular/core';
|
import { Location } from "@angular/common";
|
||||||
import {Location} from "@angular/common";
|
import { Component, EventEmitter, HostListener, Output } from '@angular/core';
|
||||||
import { DeviceService} from '../../services/device.service';
|
import { DeviceService } from '../../services/device.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-back-button',
|
selector: 'fm-back-button',
|
||||||
@ -8,16 +8,18 @@ import { DeviceService} from '../../services/device.service';
|
|||||||
styleUrls: ['./back-button.component.scss']
|
styleUrls: ['./back-button.component.scss']
|
||||||
})
|
})
|
||||||
export class BackButtonComponent {
|
export class BackButtonComponent {
|
||||||
|
@Output() beforeLocationBack = new EventEmitter();
|
||||||
|
|
||||||
@HostListener('click')
|
@HostListener('click')
|
||||||
onBackClicked() {
|
onBackClicked() {
|
||||||
|
this.beforeLocationBack.emit();
|
||||||
this.location.back();
|
this.location.back();
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(private location: Location,private deviceService:DeviceService) { }
|
constructor(private location: Location,private deviceService:DeviceService) {
|
||||||
|
}
|
||||||
|
|
||||||
public show() {
|
public show() {
|
||||||
return !this.deviceService.IsMobile();
|
return !this.deviceService.IsMobile();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user