title: How to access the app.component variables and methods from other pages in Ionic?
body: <p>I want to access and change <code>app.component.ts</code> variable or access methods from other pages (<code>otherpage.ts</code>) or other components such as;</p>
  
  <p><strong>app.component.ts</strong></p>
  
  <pre><code>@Component({
    templateUrl: 'app.html'
  })
  export class MyApp {
  
    accessedVariable: any;
  
    constructor(){ }
  
    accessedMethod() {
     ..something
    }
  
  }
  </code></pre>
  
  <p><strong>otherpage.ts</strong></p>
  
  <pre><code>@Component({
    selector: 'page-other',
    templateUrl: './otherpage.html',
  })
  export class OtherPage {
  
    constructor() { }
  }
  </code></pre>