I am new in Angular, I am using Angular 4, and I made an app using the Angular CLI, by ng new
command.
In main.ts, we have
...
import {AppModule} from './app/app.module';
.
.
platformBrowserDynamic().bootstrapModule(AppModule);
and AppModule is defined (as you see) in app/app.module
, here is what we have in app.module.ts
:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FormsModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
As you see it says export class AppModule { }
, and it also used in platformBrowserDynamic().bootstrapModule(AppModule);
Can someone please explain this for me?