liveBook · Manning

Imports property

The Angular imports property lists modules, components, directives, and pipes whose exported features are available to the declaring component or module.

How 2 Manning books explain it

Pro Angular 16

The imports property is Angular module metadata containing the modules whose exported features are available to an Angular module.

How it is used
Lists framework and custom module dependencies in `@NgModule` metadata so their exported features are available to the importing module.
How deep it goes
Works through root, store, utility, and dynamically loaded module configurations; stops short of explaining Angular’s internal module-loading mechanism.
Examples
Shows `BrowserModule` in a root module, model and forms dependencies in a store module, and child routes in an administration module.
What you can do after
Operate/configure it to give an Angular module the framework features, custom features, and child routes it needs.

Read how Pro Angular 16 explains imports property →

Modern Angular

The imports array is Angular component metadata that lists modules, standalone components, directives, and pipes available to that component.

How it is used
Enables standalone components to declare template dependencies without relying on NgModule lookup.
How deep it goes
Explains metadata usage through FormsModule and NgIf examples, then extends into incremental migration mechanics.
Examples
Uses a standalone login form with ngModel bindings, NgIf validation, FormsModule, and a root AppComponent importing RouterOutlet.
What you can do after
Apply it via Angular component metadata to assemble standalone templates and migrate NgModule declarations incrementally.

Read how Modern Angular explains imports property →

Also covered in

Related concepts

Questions about imports property

What is imports property?

The Angular imports property lists modules, components, directives, and pipes whose exported features are available to the declaring component or module.

Which Manning books explain imports property?

Pro Angular 16 and Modern Angular.

What is the difference between imports property and exports property?

The Angular imports property lists modules, components, directives, and pipes whose exported features are available to the declaring component or module. The exports property is Angular module metadata listing declarations or imported features made available to other Angular modules.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.