Advertisement
Guest User

Untitled

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