My Angular (or TypeScript) code is compiling and running successfully, but I'm facing an issue when trying to load the page in Firefox as it crashes. The problematic code resides in
app.component.html
<h1>Angular</h1>
<dd-button></dd-button>
app.module.ts
import { DdButtonComponent } from './ddButton.component';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent,
DdButtonComponent
],
imports: [
BrowserModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
ddButton.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'dd-button',
template: "<dd-button>Text</dd-button>"
})
export class DdButtonComponent {
}
app.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'Explaining Modernity';
}
I apologize for my lack of expertise with this issue, but without any error indications, it is challenging to identify the root cause. To elaborate on the crash further, upon attempting to open the page using localhost:4200
, the browser hangs for a moment before displaying the "page crashed" message in Firefox.