material icon indicating copy to clipboard operation
material copied to clipboard

ui-sref on md-tab no longer works

Open seiyria opened this issue 11 years ago • 38 comments

This used to work in 0.8.0:

      md-tabs.is-flex.auto-flex.md-accent(md-selected="selectedIndex",layout="column")
         md-tab(ui-sref="player.overview",label="Player")
            div.tab(ui-view="overview")

It no longer works as of 0.9.0-rc1. It seems extra attributes are being stripped off of these directives.

seiyria avatar Apr 15 '15 22:04 seiyria

+1

sunny9240 avatar Apr 17 '15 14:04 sunny9240

Yes we are having same issue since upgrading to 0.9.0-rc1. This fix is necessary for Tabs with external view content to work.

vishvajit-sonagara avatar Apr 18 '15 10:04 vishvajit-sonagara

@DBGTTECHJAM - agreed. Support for external view content is very important. @seiyria - Please provide a CodePen or Plunkr that demonstrates this issue.

ThomasBurleson avatar Apr 18 '15 15:04 ThomasBurleson

I am able to replicate the problem as well. I created a plunker to replicate the problem:

http://plnkr.co/edit/t0QmjueSGcNfFLG8U0n2?p=info

I first got it working with angular-material 0.8.3 and then switched to 0.9.0-rc1 in order to replicate the issue. This is my first time getting involved so please let me know if additional info is necessary... and thank you for the great libraries.

em2labs avatar Apr 18 '15 20:04 em2labs

+1

FelAmine avatar Apr 18 '15 21:04 FelAmine

+1

The following use to work quite nicely

<md-tab label="Something cool" ui-sref="something.cool"></md-tab>

But now I have to use the following(note the ui-sref must be on an element within md-tab-label`

<md-tab>
    <md-tab-label><span ui-sref="something.cool">Something cool</span></md-tab-label>
</md-tab>

epelc avatar Apr 18 '15 23:04 epelc

+1 for the workaround. Guess I'll have to go with that for now.

seiyria avatar Apr 19 '15 15:04 seiyria

Thanks for the workaround.

em2labs avatar Apr 19 '15 19:04 em2labs

+1

eclipse1985 avatar Apr 20 '15 00:04 eclipse1985

you can also try adding something like { padding: 15px; margin: -15px; } on the label so that the lnk works for the whole tab and not only the text. yeah, don't judge me.

loykianos avatar Apr 20 '15 07:04 loykianos

@loykianos - LOL. RE don't judge me > We don't... thank you for the interim workaround.

ThomasBurleson avatar Apr 20 '15 15:04 ThomasBurleson

Side note: The workaround does not solve keyboard navigation.

averas avatar Apr 24 '15 14:04 averas

+1 for making tabs work with any route persistancy that a user would open a specific tab on historyBack()

dohomi avatar Apr 30 '15 01:04 dohomi

+1

ghost avatar May 09 '15 15:05 ghost

+1

ghost avatar May 12 '15 11:05 ghost

i am using this code.

<md-tabs>
   <md-tab md-on-select="$state.transitionTo(state1, params1)"><md-tab-label>Label1</md-tab-label></md-tab>
   <md-tab md-on-select="$state.transitionTo(state2, params2)"><md-tab-label>Label2</md-tab-label></md-tab>
</md-tabs>
<div ui-view></div>

Its working fine, till now.

rosinghal avatar May 12 '15 14:05 rosinghal

@rosinghal - can you provide a CodePen that we can quickly use to test and validate fixes?

ThomasBurleson avatar May 12 '15 14:05 ThomasBurleson

+1

ask007learning avatar May 12 '15 20:05 ask007learning

+1

ismarslomic avatar May 12 '15 21:05 ismarslomic

@ThomasBurleson : Here it is http://codepen.io/rosinghal/pen/waGozW & http://codepen.io/rosinghal/pen/JdXbMz

rosinghal avatar May 13 '15 11:05 rosinghal