material icon indicating copy to clipboard operation
material copied to clipboard

refactored md-list no longer supports ui-sref

Open hodeyp opened this issue 11 years ago • 25 comments

<md-item ui-sref="newroute">
</md-item>

this should honour the ui-route routing as well as add the md-clickable class

hodeyp avatar Apr 02 '15 07:04 hodeyp

update...

<md-item class="md-3-line">
    <div class="md-item-text" ui-sref="newroute">
        <h3>Some text</h3>
    </div>
</md-item>

...does work. Not sure if this is a bug or a design decision?

hodeyp avatar Apr 02 '15 08:04 hodeyp

@hodeyp the issue is that md-list now ignores clicks itself, and requires them to go in nested items. With ng-click, this is done for you (automatically). Perhaps we should extend this to href, ng-href, ui-sref, and ng-attr-ui-sref.

This is because (from an accessibility standpoint) the md-item is already of role="listitem". To be truly accessible, the inner element should have a role="button" as elements are not able to have multiple roles.

rschmukler avatar Apr 02 '15 15:04 rschmukler

:+1: thanks @rschmukler

Agreed that it should probably support href variants.

marcysutton avatar Apr 02 '15 17:04 marcysutton

+1

I used this functionality before and was wondering why this wasn't working anymore.

Frank3K avatar Apr 08 '15 19:04 Frank3K

+1 I added a workaround using ng-click to a function that used $scope.go

johnwebbcole avatar Apr 21 '15 15:04 johnwebbcole

+1

bradmartin avatar Apr 22 '15 04:04 bradmartin

+1, $scope.go stops IE from working.

If you want to have a ripple effect on the element "md-ink-ripple" added to the tags of the element does the trip.

psaunders avatar May 08 '15 05:05 psaunders

+1

rafriki avatar May 10 '15 09:05 rafriki

+1 - I'd rather not have to call $state.go manually just to workaround this.

chzmnky avatar May 20 '15 08:05 chzmnky

+1

lievenjanssen avatar Jun 18 '15 12:06 lievenjanssen

+1

NicolasVargas avatar Jun 19 '15 11:06 NicolasVargas

+1

datoulei avatar Jun 20 '15 13:06 datoulei

+1

my workaround was wrapping the item inside a div that holds the ui-sref...

<md-list>
  <div ng-repeat="obj in col" ui-sref="route.any")
    <md-list-item>
    ...

weisk avatar Jun 21 '15 18:06 weisk

+1

konkissner avatar Jun 26 '15 14:06 konkissner

+1

ejohansson avatar Jul 10 '15 22:07 ejohansson

+1

felipetarijon avatar Jul 30 '15 16:07 felipetarijon

+1

rothanachoun avatar Aug 03 '15 02:08 rothanachoun

+1

antonwestman avatar Aug 03 '15 15:08 antonwestman

+1

aklinkert avatar Aug 23 '15 19:08 aklinkert

+1

guiporto avatar Sep 03 '15 21:09 guiporto