Passing variables by reference in typescript [Angular 8]
问题 I have a several variables on the html of the component which are given their values by the typescript file. It is declared in html as follows: <h1>{{myproperty1}}<\h1> <h1>{{myproperty2}}<\h1> <h1>{{myproperty3}}<\h1> In the typescript file they are declared in the global scope as follows: import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'], }) export class AppComponent implements OnInit {