|
|
|
@@ -0,0 +1,43 @@ |
|
|
|
import { Component, OnInit } from '@angular/core'; |
|
|
|
import { Router } from '@angular/router'; |
|
|
|
import { Location } from '@angular/common'; |
|
|
|
import { BookmarkService } from '../services/bookmark.service'; |
|
|
|
import { IMall } from '../models/mall'; |
|
|
|
import { IOutlet } from '../models/outlet'; |
|
|
|
|
|
|
|
@Component({ |
|
|
|
selector: 'app-bookmark', |
|
|
|
templateUrl: './bookmark.page.html', |
|
|
|
styleUrls: ['./bookmark.page.scss'], |
|
|
|
}) |
|
|
|
export class BookmarkPage implements OnInit { |
|
|
|
selected_tab: string = 'malls'; |
|
|
|
malls: Array<string> = []; |
|
|
|
outlets: Array<string> = []; |
|
|
|
|
|
|
|
constructor( |
|
|
|
private router: Router, |
|
|
|
private location: Location, |
|
|
|
private bookmarkService: BookmarkService |
|
|
|
) { } |
|
|
|
|
|
|
|
ngOnInit() { |
|
|
|
} |
|
|
|
|
|
|
|
ionViewDidEnter() { |
|
|
|
this.bookmarkService.getMallBookmarks().then((data: Array<string>) => { |
|
|
|
this.malls = data; |
|
|
|
console.log(this.malls); |
|
|
|
}); |
|
|
|
|
|
|
|
this.bookmarkService.getOutletBookmarks().then((data: Array<string>) => { |
|
|
|
this.outlets = data; |
|
|
|
console.log(this.outlets); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
back() { |
|
|
|
this.location.back(); |
|
|
|
} |
|
|
|
|
|
|
|
} |