mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
0.2.5 initial commit
Makefile incomplete
This commit is contained in:
23
ui/src/app/services/pwa-back.service.ts
Normal file
23
ui/src/app/services/pwa-back.service.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Router } from '@angular/router'
|
||||
import { Injectable } from '@angular/core'
|
||||
import { NavController } from '@ionic/angular'
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class PwaBackService {
|
||||
constructor (
|
||||
private readonly router: Router,
|
||||
private readonly nav: NavController,
|
||||
) { }
|
||||
|
||||
// this will strip an entry from the path on navigation
|
||||
back () {
|
||||
return this.nav.back()
|
||||
// this.router.navigate()
|
||||
// const path = this.router.url.split('/').filter(a => a !== '')
|
||||
// path.pop()
|
||||
// this.router.navigate(['/', ...path], { replaceUrl: false })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user