concept declaration in category angular
appears as: declarations, declaration, declarations

This is an excerpt from Manning's book Getting MEAN with Mongo, Express, Angular, and Node.js 2ED.
AppComponent is no longer needed, so you can remove the import statement, remove it from the declarations, and even delete the files. The changes to app.module.ts are shown in the following listing.
When you code like this, all your variables are held together as properties of an object, keeping the global space nice and neat. Working like this also minimizes the risk of having conflicting global variables. You can add more properties to this object after declaration, and even add new functions. Adding to the preceding code listing, you could have the code shown next.