Search⌘ K
AI Features

Directives

Explore how to create, generate, and organize custom directives in Ionic using the CLI. Understand their role in modifying existing components and managing code structures for better application development.

As discussed previously, directives are used to modify the behavior of an already existing component.

Creating new directives

Directives, when generated through the Ionic CLI, are automatically added to the application’s root module src/app/app.module.ts, like so ... ...