Horizon

How to: generate schematics

# Command to generate schematics on Angular

ng generate [name]

# Alias

ng g [name]

# List of Schematics

appShell
application
class
component
directive
enum
guard
interface
library
module
pipe
service
serviceWorker
universal
webWorker

Generate a new component

# Command to generate components on Angular

ng generate component [component-name] [...options]

# Alias

ng g c [component-name] [...options]

# Options
--changeDetection=Default|OnPush
--entryComponent=true|false
--export=true|false
--flat=true|false
--inlineStyle=true|false
--inlineTemplate=true|false
--lintFix=true|false
--module=module
--prefix=prefix
--project=project
--selector=selector
--skipImport=true|false
--skipSelector=true|false
--skipTests=true|false
--style=css|scss|sass|less|etc
--viewEncapsulation=Emulated|Native|None|ShadowDom

Extras

Made with Slides.com