mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-29 23:16:51 +00:00
Components and rearranging
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { HomeComponent } from './components/home/home.component';
|
||||
import { AboutComponent } from './components/about/about.component';
|
||||
import { HomeComponent } from './pages/home/home.component';
|
||||
import { AboutComponent } from './pages/about/about.component';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
|
||||
@@ -1,20 +1,2 @@
|
||||
<!-- TODO: figure out if the <nav> should go inside of a <header> element. -->
|
||||
<nav class="docs-navbar">
|
||||
<md-toolbar color="primary">
|
||||
<a md-button class="docs-button" routerLink="/" aria-label="Angular Material">
|
||||
<span>Logo</span>
|
||||
</a>
|
||||
<a md-button class="docs-button" routerLink="about">Dashboard</a>
|
||||
<a md-button class="docs-button" routerLink="about">Wallet Summary</a>
|
||||
<a md-button class="docs-button" routerLink="about">Settings</a>
|
||||
<a md-button class="docs-button" routerLink="about">Help</a>
|
||||
<div class="flex-spacer"></div>
|
||||
<a md-button class="docs-button" href="https://github.com/angular/material2" aria-label="GitHub Repository">
|
||||
GitHub
|
||||
</a>
|
||||
</md-toolbar>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<app-navbar></app-navbar>
|
||||
<router-outlet></router-outlet>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ElectronService } from './providers/electron.service';
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.scss']
|
||||
styleUrls: ['./app.component.scss'],
|
||||
})
|
||||
export class AppComponent {
|
||||
constructor(public electronService: ElectronService) {
|
||||
|
||||
@@ -10,18 +10,20 @@ import { FormsModule } from '@angular/forms';
|
||||
import { HttpModule } from '@angular/http';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { HomeComponent } from './components/home/home.component';
|
||||
import { AboutComponent } from './components/about/about.component';
|
||||
import { HomeComponent } from './pages/home/home.component';
|
||||
import { AboutComponent } from './pages/about/about.component';
|
||||
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
|
||||
import { ElectronService } from './providers/electron.service';
|
||||
import { NavbarComponent } from './shared/navbar/navbar.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent,
|
||||
HomeComponent,
|
||||
AboutComponent
|
||||
AboutComponent,
|
||||
NavbarComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
|
||||
@@ -4,3 +4,4 @@
|
||||
</h1>
|
||||
<a routerLink="/about" routerLinkActive="active" >hello</a>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,8 @@ import { Component, OnInit } from '@angular/core';
|
||||
@Component({
|
||||
selector: 'app-home',
|
||||
templateUrl: './home.component.html',
|
||||
styleUrls: ['./home.component.scss']
|
||||
styleUrls: ['./home.component.scss'],
|
||||
|
||||
})
|
||||
export class HomeComponent implements OnInit {
|
||||
title = `App works !`;
|
||||
16
web/src/app/shared/navbar/navbar.component.html
Normal file
16
web/src/app/shared/navbar/navbar.component.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<!-- TODO: figure out if the <nav> should go inside of a <header> element. -->
|
||||
<nav class="docs-navbar">
|
||||
<md-toolbar color="primary">
|
||||
<a md-button class="docs-button" routerLink="/" aria-label="Angular Material">
|
||||
<span>Logo</span>
|
||||
</a>
|
||||
<a md-button class="docs-button" routerLink="about">Dashboard</a>
|
||||
<a md-button class="docs-button" routerLink="about">Wallet Summary</a>
|
||||
<a md-button class="docs-button" routerLink="about">Settings</a>
|
||||
<a md-button class="docs-button" routerLink="about">Help</a>
|
||||
<div class="flex-spacer"></div>
|
||||
<a md-button class="docs-button" href="https://github.com/thrasher-/gocryptotrader/issues" aria-label="GitHub Repository">
|
||||
Report issue
|
||||
</a>
|
||||
</md-toolbar>
|
||||
</nav>
|
||||
0
web/src/app/shared/navbar/navbar.component.scss
Normal file
0
web/src/app/shared/navbar/navbar.component.scss
Normal file
25
web/src/app/shared/navbar/navbar.component.spec.ts
Normal file
25
web/src/app/shared/navbar/navbar.component.spec.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { NavbarComponent } from './navbar.component';
|
||||
|
||||
describe('NavbarComponent', () => {
|
||||
let component: NavbarComponent;
|
||||
let fixture: ComponentFixture<NavbarComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ NavbarComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(NavbarComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
15
web/src/app/shared/navbar/navbar.component.ts
Normal file
15
web/src/app/shared/navbar/navbar.component.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-navbar',
|
||||
templateUrl: './navbar.component.html',
|
||||
styleUrls: ['./navbar.component.scss']
|
||||
})
|
||||
export class NavbarComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user