Apologies if this question seems basic, but I am new to Angular and encountering an issue with my first app. The code is not compiling because a part of it is not being recognized. I would appreciate any hints or tips on what might be going wrong here.
Here is the content from the app.component.html file:
<!--The entire content below can be replaced with new code.-->
<div style="text-align:center">
<h1>
Welcome to {{pageTitle}}!!
</h1>
... Starter Files ...
</div>
And here is the content from the app.component.ts file:
import { Component } from '@angular/core';
@Component({
selector: 'pm-root',
template: <div><h1>{{pageTitle}}</h1></div> // **this line of code created error**
})
export class AppComponent {
pageTitle: string = 'Angular: Getting Started';
}
Lastly, the content from the app.module.ts file:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
And the index.html file:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8>
<title>Acme Product Management</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<pm-root></pm-root>
</body>
</html>
If you'd like to see the error, please refer to this link https://i.sstatic.net/O98RB.png. Any assistance in resolving this issue would be greatly appreciated.