mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-14 07:26:47 +00:00
Removes pagename.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, OnInit,ViewChild } from '@angular/core';
|
||||
import { ElectronService } from './providers/electron.service';
|
||||
import { MdSidenav } from '@angular/material';
|
||||
import { SidebarService } from './services/sidebar/sidebar.service';
|
||||
import { Router, NavigationEnd } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
@@ -7,7 +10,11 @@ import { ElectronService } from './providers/electron.service';
|
||||
styleUrls: ['./app.component.scss'],
|
||||
})
|
||||
export class AppComponent {
|
||||
constructor(public electronService: ElectronService) {
|
||||
sidebarService: SidebarService
|
||||
public currentUrl:string;
|
||||
@ViewChild('sidenav') public sidenav: MdSidenav;
|
||||
|
||||
constructor(public electronService: ElectronService,something: SidebarService, private router:Router) {
|
||||
|
||||
if (electronService.isElectron()) {
|
||||
console.log('Mode electron');
|
||||
@@ -18,5 +25,19 @@ export class AppComponent {
|
||||
} else {
|
||||
console.log('Mode web');
|
||||
}
|
||||
|
||||
this.sidebarService = something;
|
||||
|
||||
router.events.subscribe(event => {
|
||||
|
||||
if (event instanceof NavigationEnd ) {
|
||||
console.log("current url",event.url); // event.url has current url
|
||||
this.currentUrl = event.url;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.sidebarService.setSidenav(this.sidenav);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,5 @@
|
||||
<span>GoCryptoTrader</span>
|
||||
</a>
|
||||
<div class="flex-spacer"></div>
|
||||
<a md-button class="docs-button">Pagename</a>
|
||||
</md-toolbar>
|
||||
</nav>
|
||||
@@ -1,16 +0,0 @@
|
||||
<md-sidenav #sidenav mode="side" class="sidebar" opened="true">
|
||||
<md-nav-list>
|
||||
<md-list-item routerLink="dashboard" routerLinkActive="dashboard-highlight">
|
||||
<md-icon >trending_up</md-icon> <h3>Dashboard</h3>
|
||||
</md-list-item>
|
||||
<md-list-item routerLink="wallet" routerLinkActive="wallet-highlight">
|
||||
<md-icon >account_balance_wallet</md-icon> <h3>Wallet</h3>
|
||||
</md-list-item>
|
||||
<md-list-item routerLink="trading" routerLinkActive="trading-highlight">
|
||||
<md-icon >history</md-icon> <h3>Trading</h3>
|
||||
</md-list-item>
|
||||
<md-list-item routerLink="settings" routerLinkActive="settings-highlight">
|
||||
<md-icon >settings</md-icon> <h3>Settings</h3>
|
||||
</md-list-item>
|
||||
</md-nav-list>
|
||||
</md-sidenav>
|
||||
Reference in New Issue
Block a user