xandor-io / angular-material-sidemenu

A small component to make sidenav menus using Angular Material
MIT License
63 stars 50 forks source link

How to by default enable one of the md-sidemenu-content? #8

Open NetajiBandi opened 8 years ago

NetajiBandi commented 8 years ago

Hi Marcos, could you please tell us how to enable one of the md-sidemenu-content by default on load

kysela-petr commented 8 years ago

+1

nikeshbhagat commented 8 years ago

+1 This would be a great addtion

jhondev commented 7 years ago

+1

shennero commented 7 years ago

+1

hvaleanu commented 7 years ago

+1

tianctrl commented 6 years ago

+1

garycjohnson commented 6 years ago

I was looking for the same answer and found this rather hacky way to achieve what I wanted ... Add a hidden DIV with ng-init="$parent.$mdSidemenuContent.visible = true"within the content block you want to expand.

<md-sidemenu-content md-heading="Applications" md-arrow="true">
  <div ng-init="$parent.$mdSidemenuContent.visible = true" ng-hide></div>
  <md-sidemenu-button md-no-ink title="Lodge Enquiry" ui-sref="root.lodge">Lodge Enquiry</md-sidemenu-button>
</md-sidemenu-content>

Obviously would be much nicer to have an attribute we can set on the <md-sidemenu-content /> element.

andersonfalcao commented 6 years ago

I created an option for this, After the PR approved, you can use the visible option to enable the initial state of side-menu-content.

Ex. ...

blindsz commented 6 years ago

Hi is this feature already merged?

blindsz commented 6 years ago

I think this feature is not working. this will need some update