diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app.routing.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app.routing.ts new file mode 100644 index 0000000..0d8d551 --- /dev/null +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app.routing.ts @@ -0,0 +1,12 @@ +import {RouterModule, Routes} from '@angular/router'; +import {HomeComponent} from './app/pages/home/home.component'; + +const routes: Routes = [ + { + path: '', + component: HomeComponent, + pathMatch: 'full' + }, +]; + +export const appRoutingModule = RouterModule.forRoot(routes); diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/app.module.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/app.module.ts index cecdded..804d468 100644 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/app.module.ts +++ b/SessionCompanion/SessionCompanion/ClientApp/src/app/app.module.ts @@ -5,28 +5,21 @@ import { HttpClientModule } from '@angular/common/http'; import { RouterModule } from '@angular/router'; import { AppComponent } from './app.component'; -import { NavMenuComponent } from './nav-menu/nav-menu.component'; -import { HomeComponent } from './home/home.component'; -import { CounterComponent } from './counter/counter.component'; -import { FetchDataComponent } from './fetch-data/fetch-data.component'; +import { NavMenuComponent } from './components/nav-menu/nav-menu.component'; +import { HomeComponent } from './pages/home/home.component'; +import {appRoutingModule} from '../app.routing'; @NgModule({ declarations: [ AppComponent, NavMenuComponent, - HomeComponent, - CounterComponent, - FetchDataComponent + HomeComponent ], imports: [ BrowserModule.withServerTransition({ appId: 'ng-cli-universal' }), HttpClientModule, FormsModule, - RouterModule.forRoot([ - { path: '', component: HomeComponent, pathMatch: 'full' }, - { path: 'counter', component: CounterComponent }, - { path: 'fetch-data', component: FetchDataComponent }, - ]) + appRoutingModule ], providers: [], bootstrap: [AppComponent] diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/nav-menu/nav-menu.component.css b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/nav-menu/nav-menu.component.css similarity index 100% rename from SessionCompanion/SessionCompanion/ClientApp/src/app/nav-menu/nav-menu.component.css rename to SessionCompanion/SessionCompanion/ClientApp/src/app/components/nav-menu/nav-menu.component.css diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/nav-menu/nav-menu.component.html b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/nav-menu/nav-menu.component.html similarity index 100% rename from SessionCompanion/SessionCompanion/ClientApp/src/app/nav-menu/nav-menu.component.html rename to SessionCompanion/SessionCompanion/ClientApp/src/app/components/nav-menu/nav-menu.component.html diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/nav-menu/nav-menu.component.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/components/nav-menu/nav-menu.component.ts similarity index 100% rename from SessionCompanion/SessionCompanion/ClientApp/src/app/nav-menu/nav-menu.component.ts rename to SessionCompanion/SessionCompanion/ClientApp/src/app/components/nav-menu/nav-menu.component.ts diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/counter/counter.component.html b/SessionCompanion/SessionCompanion/ClientApp/src/app/counter/counter.component.html deleted file mode 100644 index 89b9c80..0000000 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/counter/counter.component.html +++ /dev/null @@ -1,7 +0,0 @@ -
This is a simple example of an Angular component.
- -Current count: {{ currentCount }}
- - diff --git a/SessionCompanion/SessionCompanion/ClientApp/src/app/counter/counter.component.spec.ts b/SessionCompanion/SessionCompanion/ClientApp/src/app/counter/counter.component.spec.ts deleted file mode 100644 index 37b350c..0000000 --- a/SessionCompanion/SessionCompanion/ClientApp/src/app/counter/counter.component.spec.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { CounterComponent } from './counter.component'; - -describe('CounterComponent', () => { - let fixture: ComponentFixtureThis component demonstrates fetching data from the server.
- -Loading...
- -Date | -Temp. (C) | -Temp. (F) | -Summary | -
---|---|---|---|
{{ forecast.date }} | -{{ forecast.temperatureC }} | -{{ forecast.temperatureF }} | -{{ forecast.summary }} | -