Skip to main content

angular - Interpolation expression

app.component.ts

import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})

export class AppComponent {
  name: String = "Jenny";
}
app.component.html

<h2>
    Hello, I am {{name}}!
    I am {{3*5+10}} years old.
</h2>
More Angular tutorials