Example
Why menu item "Menu1" above the others if i add ui-sref ????
<md-button ui-sref="menu1" >Menu1</md-button>
<md-button>Menu2</md-button>
It's actually better to wrap the button in the a
tag. The problem with the recommended solution is that only the text acts as a link rather than the whole button, so I'd suggest;
<a ui-sref="menu1"><md-button>Menu1</md-button></a>
If you are using ui-sref
, then you should enclose it with Anchor tag.
<md-button><a ui-sref="menu1">Menu1</a></md-button>
As Hooligancat says, here is the updated Code:
<a ui-sref="menu1" class="md-button">Menu1</a>
Hope it works
Better yet is to dispense with using two tags and specify 'md-button' as a class on the 'a' tag.
<a ui-sref="menu1" class="md-button">Menu1</a>
You can of course add any other material class tags too...
<a ui-sref="menu1" class="md-button md-raised md-primary">Menu1</a>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With