ui-router-extras icon indicating copy to clipboard operation
ui-router-extras copied to clipboard

ui-sref doesn't work with futurestate

Open christopherthielen opened this issue 10 years ago • 6 comments

christopherthielen avatar Aug 28 '14 19:08 christopherthielen

I saw your commit in ui-router (https://github.com/angular-ui/ui-router/commit/656b5aab906e5749db9b5a080c6a83b95f50fd91)

I guess it should address this issue, right? Good job. :)

smajl avatar Sep 20 '14 16:09 smajl

Partially, but one problem will remain. The link will not look clickable because there will be no HREF. also, Once the state becomes available, the HREF is not updated.

christopherthielen avatar Sep 20 '14 16:09 christopherthielen

Moving to future. Not sure how to approach this bug.

christopherthielen avatar Nov 04 '14 00:11 christopherthielen

In the mean time, to work around this problem you could just do something like <a ui-sref="state" href="">Go to state</a>

OvidiuGuta avatar Dec 08 '14 13:12 OvidiuGuta

So instead of skipping here - https://github.com/angular-ui/ui-router/blob/master/release/angular-ui-router.js#L4035 ... just set it to # and then on click check the attr and if its # use the state.go

amcdnl avatar Feb 04 '15 01:02 amcdnl

Suggest to look on decorating ui-sref or duplacate ui-sref directive due to fact that angular will run both, original and duplicate. So we can update href after futurestates loaded.

vshabelnyk avatar Jan 28 '16 16:01 vshabelnyk