The absolute minimal configuration for a @Component
in Angular is a template. Both template properties are set to optional because you have to define either template
or templateUrl
.
When you don’t define them, you will get an exception like this:
No template specified for component 'ComponentName'
A selector property is not required, as you can also use your components in a route.