From the course: Learning Angular

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Using CLI generated components

Using CLI generated components - Angular Tutorial

From the course: Learning Angular

Start my 1-month free trial

Using CLI generated components

- [Instructor] Now that you've installed and learned the structure of the Angular CLI project, let's take a look at how Angular uses these generated files and start working with components. The main TS file is the main file which loads everything else in your application. So let's go ahead and start with that one. Most of the time you won't have to mess with this file. The first thing you'll notice is that there is a series of import statements. Angular itself is modular, which means that it is built on small pieces of code. In order to use different features, you have load them separately using this import statement. Some items are imported from groups of modules called libraries, and some are imported directly from the files that you've created. The first two import strings are from Angular libraries that are in your known modules folder. The biggest one of which is the core module, which has most of the components you'll need for running applications. The next two imports, as you…

Contents