After watching several Angular 7 project tutorials on YouTube, I found myself struggling with a basic task - passing a name from the component.ts file to the component.html file.
The current output of my code simply displays "Hello" without the actual name, and there are no error messages being shown.
This is what my APP.COMPONENT.TS file looks like:
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
name:string = 'Brad';
}
And this is how my APP.COMPONENT.HTML file is structured:
<div>
<h1>Hello {{ name | uppercase }} </h1>
{{ 1 + 1 }}
</div>