Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { Component } from '@angular/core';
  2. import { ActionSheetController } from 'ionic-angular';
  3.  
  4. @Component({
  5.   selector: 'page-main',
  6.   templateUrl: 'main.html'
  7. })
  8. export class MainPage {
  9.   cancelMsg: string;
  10.  
  11.   constructor(public actionSheetCtrl: ActionSheetController) {
  12.     this.cancelMsg = "Close";
  13.   }
  14. }
  15.  
  16.  
  17. import { Component  } from '@angular/core';
  18. import { MainPage } from '../main/main';
  19.  
  20. @Component({
  21.   templateUrl: 'page-tab.html',
  22.   providers: [MainPage]
  23. })
  24. export class TabPage{
  25.  
  26.   constructor(public mainPage: MainPage) {
  27.     alert(mainPage.cancelMsg);
  28.   }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement