Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support scheme, host, and port in route generation #88

Closed
davidpeden3 opened this issue May 7, 2015 · 3 comments
Closed

Support scheme, host, and port in route generation #88

davidpeden3 opened this issue May 7, 2015 · 3 comments

Comments

@davidpeden3
Copy link

It would be great to be able to pass a configuration object to router.generate that would enable fully qualified URIs to be rendered. As it is now, you only get a relative path (which is fine by default).

@EisenbergEffect
Copy link
Contributor

@bryanrsmith How are we on this?

@jwahyoung
Copy link
Contributor

@bryanrsmith Currently, the router can track a baseUrl - but this isn't specifically a fully qualified URI. Do we want to use window.location.origin or document.URL for this? Using either of those would mean pulling in a dependency for aurelia-pal. Of note, certain browsers (IE) may have to be handled a bit differently.

@bryanrsmith
Copy link
Contributor

I think we should add a new method to history & history-browser to get the root location. If I remember correctly, there's at least one other place in the router where we read history._baseUrl (which will break with any other history implementation). If we add a history.getRoot(), or history.getBaseUrl() we could use it here too.

jwahyoung added a commit to jwahyoung/history that referenced this issue Feb 18, 2016
Per aurelia/router#88 we want to be able to generate an absolute URI with the `router.generate()` method. That method relies upon the history module. `getOrigin` allows the router to generate an absolute URI with the protocol, hostname, and port.
jwahyoung added a commit to jwahyoung/history-browser that referenced this issue Feb 18, 2016
Per aurelia/router#88 we want to be able to generate an absolute URI with the `router.generate()` method. That method relies upon the history module. `getOrigin` allows the router to generate an absolute URI with the protocol, hostname, and port.
jwahyoung added a commit to jwahyoung/router that referenced this issue Feb 18, 2016
Adds an extra boolean argument to `router.generate` to specify whether or not to generate an absolute URI.

Fixes aurelia#88.
jwahyoung added a commit to jwahyoung/history that referenced this issue Feb 19, 2016
Per aurelia/router#88 we want to be able to generate an absolute URI with the `router.generate()` method. That method relies upon the history module. `getAbsoluteRoot` allows the router to generate a fully-qualified root URL.
jwahyoung added a commit to jwahyoung/history-browser that referenced this issue Feb 19, 2016
Per aurelia/router#88 we want to be able to generate an absolute URI with the `router.generate()` method. That method relies upon the history module. `getAbsoluteRoot` allows the router to generate a fully-qualified root URL.
jwahyoung added a commit to jwahyoung/router that referenced this issue Feb 19, 2016
Adds an extra boolean argument to `router.generate` to specify whether or not to generate an absolute URI.

Fixes aurelia#88.
jwahyoung added a commit to jwahyoung/history-browser that referenced this issue Feb 19, 2016
Per aurelia/router#88 we want to be able to generate an absolute URI with the `router.generate()` method. That method relies upon the history module. `getAbsoluteRoot` allows the router to generate a fully-qualified root URL.
jwahyoung added a commit to jwahyoung/history that referenced this issue Feb 25, 2016
Per aurelia/router#88 we want to be able to generate an absolute URI with the `router.generate()` method. That method relies upon the history module. `getAbsoluteRoot` allows the router to generate a fully-qualified root URL.
jwahyoung added a commit to jwahyoung/history-browser that referenced this issue May 3, 2016
Per aurelia/router#88 we want to be able to generate an absolute URI with the `router.generate()` method. That method relies upon the history module. `getAbsoluteRoot` allows the router to generate a fully-qualified root URL.
jwahyoung added a commit to jwahyoung/history that referenced this issue May 3, 2016
Per aurelia/router#88 we want to be able to generate an absolute URI with the `router.generate()` method. That method relies upon the history module. `getAbsoluteRoot` allows the router to generate a fully-qualified root URL.
jwahyoung added a commit to jwahyoung/router that referenced this issue May 4, 2016
Adds an extra boolean argument to `router.generate` to specify whether or not to generate an absolute URI.

Fixes aurelia#88.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants