My attempt at creating a web app using Angular resulted in successful compilation with no errors. However, upon execution, the browser displays a blank page accompanied by the following error message:
ERROR Error: Uncaught(in promise): Error: StaticInjectorError(AppModule)[NgbDropdown -> ChangeDetectorRef]:
This is my app.module.ts file:
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
Importing various modules...
@NgModule({
Imports: [
BrowserAnimationsModule,
FormsModule,
HttpClientModule,
ComponentsModule,
RouterModule,
AppRoutingModule,
NgbModule,
ToastrModule.forRoot()
],
Declarations: [
AppComponent,
AdminLayoutComponent
],
Providers: [],
Bootstrap: [AppComponent]
})
export class AppModule {}
Here's my package.json:
{
// Package details...
}
This is my app.component.ts:
import { Component } from '@angular/core';
@Component({
Selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
Title = 'testProject';
}
And this is my admin-layout.component.ts:
import { Filter } from 'rxjs/operators';
Importing necessary components and modules...
export class AdminLayoutComponent implements OnInit {
Implementing methods and functions...
}