x)- [ ] bug report -> please search issues before submitting
- [X] feature request
@angular/cli: 1.1.0-beta.0
node: 6.10.3
os: darwin x64
@angular/animations: 4.1.3
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/core: 4.1.3
@angular/forms: 4.1.3
@angular/http: 4.1.3
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/router: 4.1.3
@angular/upgrade: 4.1.3
@angular/cli: 1.1.0-beta.0
@angular/compiler-cli: 4.1.3
@angular/language-service: 4.1.3
I would like "ng serve" to open up a URL like "http://localhost:4200?foo=bar". I can see how to set the hostname and the port, but I can't figure out how to configure "?foo=bar". Is this possible?
At this time this is not possible, can you please explain the use case?
Most users would go to https://foo.com and not https://foo.com?foo=bar so it seems like you could add a redirect to your app if you need that functionality.
+1
You will need this option to test if your application will need some parameters from the parent window in which your app is loaded.
In this case., to do a unit testing., you need this option.
Pls advice
+1
Would love to see this option as well since I'll always base my application on url parameters received from parent.
+1
In our case the project structure is more complex and the angular app is just one part of the application. The dev server should serve the full application to make testing easy (which works fine by using the proxy configuration) and it is necessary to load resources outside of the angular app base href. I tried some other options of the CLI like --serve-path and --base-href. Those caused other problems with our setup.
It is currently not possible to directly open the URL which is the entry point of the angular application. It works by manually open the URL.
So, a solution for this issue would fix our problem as well.
How about changing the start script in package.json to ng serve && open http://localhost:4200/?foo=bar, or something similar?
Closing the issue due to inactivity. If the problem still exists in the latest version of the CLI, please open a new issue following the template and providing a minimal demo where we can reproduce it. Thanks! :-)
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
+1
In our case the project structure is more complex and the angular app is just one part of the application. The dev server should serve the full application to make testing easy (which works fine by using the proxy configuration) and it is necessary to load resources outside of the angular app base href. I tried some other options of the CLI like --serve-path and --base-href. Those caused other problems with our setup.
It is currently not possible to directly open the URL which is the entry point of the angular application. It works by manually open the URL.
So, a solution for this issue would fix our problem as well.