Created
September 3, 2018 10:50
-
-
Save samarthagarwal/ac284ef79ec5f0c41f8fe6d9ff4a67aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { NavController } from '@ionic/angular'; | |
import { NavigationService } from '../navigation.service'; | |
@Component({ | |
selector: 'app-office', | |
templateUrl: './office.page.html', | |
styleUrls: ['./office.page.scss'], | |
}) | |
export class OfficePage implements OnInit { | |
name: string; | |
constructor(private navCtrl: NavController, private navigationService: NavigationService) { | |
// Getting the value of name from the JSON data sent from the home page | |
this.name = this.navigationService.getData().name; | |
} | |
goBack(){ | |
this.navCtrl.goBack('/home'); | |
} | |
ngOnInit() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment