Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Component } from '@angular/core';
- import { IonicPage, NavController, NavParams } from 'ionic-angular';
- import { Reservasi } from '../reservasi/reservasi';
- import { RestapiService } from '../../providers/restapi-service';
- /**
- * Generated class for the Salondetil page.
- *
- * See http://ionicframework.com/docs/components/#navigation for more info
- * on Ionic pages and navigation.
- */
- @IonicPage({
- name: 'salondetil'
- })
- @Component({
- selector: 'page-salondetil',
- templateUrl: 'salondetil.html',
- })
- export class Salondetil {
- data:any;
- constructor(public navCtrl: NavController, public navParams: NavParams, private restapiService: RestapiService) {
- this.data = {
- id : this.navParams.get('id')
- };
- this.loadData();
- }
- ionViewWillEnter(){
- if(this.navParams.get('id') == undefined){
- this.navCtrl.popToRoot();
- }
- }
- ionViewDidLoad() {
- console.log('ionViewDidLoad Salondetil');
- }
- reservasi() {
- this.navCtrl.push(Reservasi);
- }
- loadData(){
- this.restapiService.viewSalondetil({id:this.data.id_user}).then(
- (dt) => {
- let result :any = dt;
- this.data = dt;
- },
- () => {
- }
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement