How do you create displayBlock components?

By default, Angular CLI creates components in an inline displayed mode(i.e, display:inline). But it is possible to create components with display: block style using displayBlock option,

ng generate component my-component --displayBlock

(OR) the option can be turned on by default in Angular.json with schematics.@schematics/angular:component.displayBlock key value as true.

Author of content
Edit this page

Made by Michael Sakhniuk