Skip to content
This repository was archived by the owner on Sep 4, 2020. It is now read-only.

Commit b428376

Browse files
feat: project setup
1 parent af8220c commit b428376

27 files changed

+1096
-41
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"karma-cli": "^1.0.1",
3737
"karma-jasmine": "^1.0.2",
3838
"karma-remap-istanbul": "^0.2.1",
39+
"node-sass": "^3.10.0",
3940
"protractor": "4.0.5",
4041
"ts-node": "1.2.1",
4142
"tslint": "3.13.0",

src/app/app.component.css

Whitespace-only changes.

src/app/app.component.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
<h1>
2-
{{title}}
3-
</h1>
1+
<header class="header"><h1>Title here</h1></header>
2+
<app-navbar></app-navbar>
3+
<div class="content-container">
4+
<router-outlet></router-outlet>
5+
</div>

src/app/app.component.scss

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@import './styles/variables';
2+
html, body {
3+
height: 100%;
4+
}
5+
.header {
6+
position: fixed;
7+
top: 0;
8+
left: $navWidth;
9+
right: 0;
10+
width: 100%;
11+
background-color: yellow;
12+
height: $headerHeight;
13+
h1 {
14+
margin: 0;
15+
}
16+
}
17+
.content-container {
18+
margin-left: $navWidth;
19+
margin-top: $headerHeight;
20+
}

src/app/app.component.spec.ts

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/app/app.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import { Component } from '@angular/core';
1+
import { Component, ViewEncapsulation } from '@angular/core';
22

33
@Component({
44
selector: 'app-root',
55
templateUrl: './app.component.html',
6-
styleUrls: ['./app.component.css']
6+
styleUrls: ['./app.component.scss'],
7+
encapsulation: ViewEncapsulation.None
78
})
89
export class AppComponent {
910
title = 'app works!';

src/app/app.module.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
import { BrowserModule } from '@angular/platform-browser';
22
import { NgModule } from '@angular/core';
33
import { FormsModule } from '@angular/forms';
4+
import { RouterModule } from '@angular/router';
45
import { HttpModule } from '@angular/http';
56

67
import { AppComponent } from './app.component';
8+
import { routes } from './app.routes';
9+
10+
import { SharedModule } from './shared/shared.module';
11+
import { HomeComponent } from './home/home.component';
712

813
@NgModule({
914
declarations: [
10-
AppComponent
15+
AppComponent,
16+
HomeComponent
1117
],
1218
imports: [
1319
BrowserModule,
1420
FormsModule,
15-
HttpModule
21+
HttpModule,
22+
RouterModule.forRoot(routes),
23+
SharedModule.forRoot(),
1624
],
1725
providers: [],
1826
bootstrap: [AppComponent]

src/app/app.routes.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { Routes } from '@angular/router';
2+
3+
import { homeRoutes } from './home/index';
4+
5+
export const routes: Routes = [
6+
...homeRoutes
7+
];

0 commit comments

Comments
 (0)