Code Monkey home page Code Monkey logo

Comments (6)

rubyboy avatar rubyboy commented on July 20, 2024

Have a look at the these two code samples in the example app, one with fake routing (using sidenav) and another that sets the href to a real route. It depends on your usage. Notice that href "#" will refresh the window. You can cancel that ("event.preventDefault") or use one of these techniques:
https://github.com/InfomediaLtd/angular2-materialize/blob/master/app/components/side-nav.ts
https://github.com/InfomediaLtd/angular2-materialize/blob/master/app/components/tabs-routing.ts

from angular2-materialize.

cyberbobjr avatar cyberbobjr commented on July 20, 2024

Thanks for your answer, i'll look for that :)

from angular2-materialize.

rubyboy avatar rubyboy commented on July 20, 2024

Can I close this issue?

from angular2-materialize.

cyberbobjr avatar cyberbobjr commented on July 20, 2024

Hi, sorry for the delay
not yet tested :(

from angular2-materialize.

cyberbobjr avatar cyberbobjr commented on July 20, 2024

Hi, it's works ! i made different class for visibility, like this :

<div class="navbar-fixed hide-on-small-only">
  <nav>
    <div class="nav-wrapper teal darken-3">
      <ul class="right">
        <li><a [routerLink]="['/yyyy']">yyyy</a></li>
        <li><a hreF="#" (click)="xxxx($event)">xxxx</a></li>
        <li><a href="#" (click)="logout($event)">Logout</a></li>
      </ul>
    </div>
  </nav>
</div>

<nav class="hide-on-med-and-up teal darken-3">
  <div class="container">
    <ul id="slide-out" class="side-nav fixed">
      <li class="logo" style="text-align: center;">
        <img src="image.png" style="padding-top: 10px;">
      </li>
      <li class="no-padding">
        <ul>
        <li><a [routerLink]="['/yyyy']">yyyy</a></li>
        <li><a hreF="#" (click)="xxxx($event)">xxxx</a></li>
        <li><a href="#" (click)="logout($event)">Logout</a></li>
        </ul>
      </li>
    </ul>
    <a href="#" materialize="sideNav" [materializeParams]="[{edge:'left'}]" data-activates="slide-out"
       class="button-collapse">
      <i class="fa fa-bars fa-2x"></i>
    </a>
  </div>
</nav>

from angular2-materialize.

rubyboy avatar rubyboy commented on July 20, 2024

Cool. Thanks for testing it and providing your solution.

from angular2-materialize.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.