InfomediaLtd / angular2-materialize

Angular 2 support for Materialize CSS framework.
https://infomedialtd.github.io/angular2-materialize/
MIT License
407 stars 140 forks source link

SideNav #379

Open jcfrane opened 7 years ago

jcfrane commented 7 years ago

Hi,

Do this project support sideNav?

I cant make it to actually work. Other components are working nicely.

This is my HTML:

`<ul materialize="sidenav" id="slide-out" class="side-nav">
  <li><div class="user-view">
    <div class="background">
      <img src="images/office.jpg">
    </div>
    <a href="#!user"><img class="circle" src="images/yuna.jpg"></a>
    <a href="#!name"><span class="white-text name">John Doe</span></a>
    <a href="#!email"><span class="white-text email">jdandturk@gmail.com</span></a>
  </div></li>
  <li><a href="#!"><i class="material-icons">cloud</i>First Link With Icon</a></li>
  <li><a href="#!">Second Link</a></li>
  <li><div class="divider"></div></li>
  <li><a class="subheader">Subheader</a></li>
  <li><a class="waves-effect" href="#!">Third Link With Waves</a></li>
</ul>
<a href="#" data-activates="slide-out" class="button-collapse"><i class="material-icons">menu</i></a>
`

How can I actually implement the sideNav?

Thanks!

rubyboy commented 6 years ago

https://github.com/InfomediaLtd/angular2-materialize/blob/master/sample/src/app/components/side-nav.ts

Jeyaprakash1206 commented 6 years ago

The same is not working for mobile. I tried lot can you please help me?

image

mobile view image

wvandeneede commented 6 years ago

@Jeyaprakash1206 In the sample fixed is added as a class. This will cause the sideNav to be fixed and open on large screens and hides to the regular functionality on smaller screens. Ref: http://materializecss.com/side-nav.html bottom of the page under Fixed HTML Structure