Which one is correct to use “an equal sign or a space” to add values to options in Angular CLI Commands?
For the Angular CLI command, you can use either an equal sign or a space to add values to options. The Angular CLI follows Unix/POSIX conventions for option syntax, allowing for both styles.
Syntax Examples
The general syntax is ng new <name> [options].
Using an equal sign:
ng new my-app --style=scss --routing=true
Using a space:
ng new my-app --style scss --routing true
Boolean Options
For boolean options, you have even more flexibility:
Setting a flag to true can be done with --option, --option=true, or --option true.
ng new my-app --routing # Sets --routing to true
ng new my-app --routing=true
ng new my-app --routing true
Setting a flag to false can be done with --no-option, --option=false, or --option false.
ng new my-app --skip-tests # Sets --skip-tests to true (skips tests)
ng new my-app --no-skip-tests # Sets --skip-tests to false (generates tests)
ng new my-app --skip-tests=false
Conclusion
Both the equal sign and a space are valid delimiters for specifying option values in Angular CLI commands. The choice is up to your preference.