Skip to content

Instantly share code, notes, and snippets.

@calvimor
Last active April 10, 2017 17:10
Show Gist options
  • Save calvimor/19ad5abfdceea99e2017a07095e2881d to your computer and use it in GitHub Desktop.
Save calvimor/19ad5abfdceea99e2017a07095e2881d to your computer and use it in GitHub Desktop.
Options to configure the angular CLI
OPTION ALIAS DESCRIPTION
--flat Should a folder be created?
--inline-template -it Will the template be in the .ts file?
--inline-style -is Will the style be in the .ts file?
--spec Generate a spec?
--view-encapsulation -ve View encapsulation strategy
--change-detection -cd Change detection strategy
--dry-run -d Report the files, don’t write them
ng g service customer-data --flat false //Alias s with flat false will create a folder for this service
// WARNING Service is generated but not provided, it must be provided to be used => add service to providers into the module
//if you want to add a module you can run this command instead the before
ng g s sales-data2 -m app.module
ng g pipe init-caps //Alias p
ng g class customer-model //Alias cl
ng g directive search //Alias d
ng g interface orders //Alias i
ng g enum gender //Alias e
1. ng new <some-flags>
2. Manually edit .angular-cli.json
3. ng set <property> <value>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment