Comments (6)
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.
Thanks for your answer, i'll look for that :)
from angular2-materialize.
Can I close this issue?
from angular2-materialize.
Hi, sorry for the delay
not yet tested :(
from angular2-materialize.
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.
Cool. Thanks for testing it and providing your solution.
from angular2-materialize.
Related Issues (20)
- Callback function for onCloseEnd parameter is always being invoked HOT 1
- Project seems unmaintained HOT 3
- unable to use MzToastModule HOT 1
- How do I upgrade this to Angular 6? keep getting type definition error
- checkbox needs doubleclick to uncheck
- Carousel does not load data from service
- Using default html elements HOT 2
- Sidenav did not close
- Checkbox - indeterminate state HOT 1
- Uncaught Error: Template parse errors: Can't bind to 'materializeActions' since it isn't a known property of 'div'. HOT 1
- Uncaught Error: Couldn't find Materialize object on window HOT 13
- Javascript components are unstable
- Select from angular2-material does not work when loading data from an observable
- Datepicker and Select immediately closing on open HOT 21
- How to add carousel-item after http request
- When Router changes the page the materialize module.js stops working
- material_select multiple problem after reset
- want to use in angular 9
- how to use modal that can be reused in other components
- Don't open/show my modal, when I try to open, the modal doesn't show and the button doesn't any action. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular2-materialize.