Skip to content

Allow absolute option for ui-sref-opts (common use case: email templates) #1081

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

Closed
demetriusnunes opened this issue May 15, 2014 · 7 comments
Labels
Milestone

Comments

@demetriusnunes
Copy link

I am using to ui-sref in html email templates that of course need to have absolute urls.

I don't understand why ui-sref-opts restrict the use of the absolute option.

@mariuskubilius
Copy link

use simple nghref it's that easy.

@demetriusnunes
Copy link
Author

Yes, I am using it, but I have to create a method on the controller to export the url so that it can be interpolated in the ng-href attribute. Just plain ugly. I'd rather use ui-sref only. Why is this an issue anyway?

@nateabele
Copy link
Contributor

Sounds okay to me. I believe it was simply overlooked in the existing implementation. Feel free to submit a PR with a test case, otherwise, I'll get to it when I have a chance.

@demetriusnunes
Copy link
Author

Just did: #1099

@UnicodeSnowman
Copy link

is there a reason why the allowedOptions array is restricted to only "location", "inherit", and "reload" in the first place?

@shaneeb
Copy link

shaneeb commented Feb 11, 2015

FYI, created a new PR #1750 to get this fixed. This is something I needed to fix urls displayed in browser status bar (or whatever it's called now). Basically my static assets are hosted on S3 and I have a custom domain set up on top. I use a base tag to specify S3 bucket for loading assets. Unfortunately the link in base tag is used instead of browser's address bar location when relative links are used. This has no effect functionally except that when hovering over the link, the url showed is relative to S3 one. Using absolute option seems to fix that but it's not allowed in uiSrefOpts (yet).

@nateabele
Copy link
Contributor

Fixed in #1750.

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

No branches or pull requests

6 participants