To see the list of all options that we can use with "ng serve" command use --help option
ng serve --help
The following page also shows all the options that can be used with ng serve
https://github.com/angular/angular-cli/wiki/serve
The following command, builds and launches the application in your default browser.
ng serve --open
Many of our channel subscribers have sent me emails saying their application is using Internet Explorer, but they want to use Google chrome instead. So thier question is how to change my default browser. Well that's simple and it really depends on the operating system you have. For example, on a Windows 7 operatin system here are the steps to change your default browser.
Instead of using the full option name --open, you can also use it's alias -o
The following table shows the common options, alias, default value & their purpose
The following page also shows all the options that can be used with ng serve
https://github.com/angular/angular-cli/wiki/serve
The following command, builds and launches the application in your default browser.
ng serve --open
Many of our channel subscribers have sent me emails saying their application is using Internet Explorer, but they want to use Google chrome instead. So thier question is how to change my default browser. Well that's simple and it really depends on the operating system you have. For example, on a Windows 7 operatin system here are the steps to change your default browser.
- Click on the Windows Start Button and in the "Search programs and files" text box type: Control
- Control Panel would appear in the list. Click on it.
- In the "Control Panel" window, click on "Default Programs"
- In the "Default Programs" window, click on "Set your default programs"
- In the list of programs that appear, select the "Browser" that you want to be the default browser and then click on the link that says "Set this program as default"
Instead of using the full option name --open, you can also use it's alias -o
The following table shows the common options, alias, default value & their purpose
Option | Alias | Default | Purpose |
---|---|---|---|
--watch | -w | true | Run build when files change |
--live-reload | -lr | true | Whether to reload the page on change |
--open | -o | false | Opens the url in default browser |
--port | -p | 4200 | The port on which the server is listening |
--extract-css | -ec | Extract css from global styles onto css files instead of js ones |
0 comments:
Post a Comment
Note: only a member of this blog may post a comment.