Coding task · Angular course · Module 3: Modules

Practice: Standalone Component

A self-contained component needs no NgModule: it lists the elements its template uses directly in the @Component decorator. Components have been self-contained by default since Angular 19, but here write the setting out explicitly.

Task

Complete the samurai card component so that it works without an NgModule and brings in CommonModule and RouterLink, which its template uses, by itself.