Click here to Skip to main content
14,665,301 members
Rate this:
Please Sign up or sign in to vote.
See more:
import { Component } from '@angular/core';
  selector: 'app-root',
  template: `
  styleUrls: ['./app.component.css']
export class AppComponent {
  someVariable: someType = somevalue 

 ***//can i access through other than this.someVariable line AppComponent.someVariable;***


What I have tried:

sometimes there may be situation like using bootbox function in which 'this' does not refers to 'AppComponent' so one must use 'es arrow' function to achieve this so is there any way other than this
Updated 22-Sep-20 5:56am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100