Skip to content

Commit e4ab93c

Browse files
authored
Merge pull request CCAppDevs#90 from gotsanity/development
added coming soon with back button that returns you to the previous page
2 parents 7f048b4 + 0bb6fee commit e4ab93c

6 files changed

Lines changed: 80 additions & 2 deletions

File tree

modelcabinet.client/src/app/app-routing.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { HelpProjectComponent } from './Help-Page/Help-Page.component';
99
import { AssetListComponent } from './asset/asset-list/asset-list.component';
1010
import { AssetDetailComponent } from './asset/asset-detail/asset-detail.component';
1111
import { ProfilePageComponent } from './profile-page/profile-page.component';
12+
import { ComingSoonComponent } from './coming-soon/coming-soon.component';
1213

1314
// TODO: Change Names to actual Module Names
1415
const routes: Routes = [
@@ -22,7 +23,8 @@ const routes: Routes = [
2223
{ path: 'Help', component: HelpProjectComponent },
2324
{ path: 'Assets', component: AssetListComponent },
2425
{ path: 'Assets/:id', component: AssetDetailComponent},
25-
{ path: 'User', component: ProfilePageComponent }
26+
{ path: 'User', component: ProfilePageComponent },
27+
{ path: 'coming-soon', component: ComingSoonComponent },
2628
];
2729

2830
@NgModule({
Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11

22

33

4-
// Project Edit Component
4+
import { ProjectEditComponent } from './projects/project-edit/project-edit.component';
5+
import { ReactiveFormsModule } from '@angular/forms';
6+
import { AssetListComponent } from './asset/asset-list/asset-list.component';
7+
import { AssetDetailComponent } from './asset/asset-detail/asset-detail.component';
8+
import { ComingSoonComponent } from './coming-soon/coming-soon.component';
59

10+
@NgModule({
11+
declarations: [
12+
AppComponent,
13+
LandingPageComponent,
14+
ProjectPageComponent,
15+
ProjectListPageComponent,
16+
ProfilePageComponent,
17+
NavBarComponent,
18+
ChangelogComponent,
19+
ProfilePageComponent,
20+
AboutProjectComponent,
21+
ChangelogComponent,
22+
ProjectEditComponent,
23+
AssetListComponent,
24+
AssetDetailComponent,
25+
ComingSoonComponent
26+
],
27+
imports: [
28+
BrowserModule,
29+
AppRoutingModule,
30+
ReactiveFormsModule // For Project Edit Component
31+
],
32+
providers: [provideHttpClient()], // Using this method rather than the module as the module is labeled as depricated
33+
bootstrap: [AppComponent]
34+
})
35+
export class AppModule { }

modelcabinet.client/src/app/coming-soon/coming-soon.component.css

Whitespace-only changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<div class="container-fluid">
2+
<h1>Oops!</h1>
3+
<h3>This feature has not been added yet...</h3>
4+
<button class="btn btn-sm btn-primary" (click)="goBack()">Go Back</button>
5+
</div>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { ComingSoonComponent } from './coming-soon.component';
4+
5+
describe('ComingSoonComponent', () => {
6+
let component: ComingSoonComponent;
7+
let fixture: ComponentFixture<ComingSoonComponent>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
declarations: [ComingSoonComponent]
12+
})
13+
.compileComponents();
14+
15+
fixture = TestBed.createComponent(ComingSoonComponent);
16+
component = fixture.componentInstance;
17+
fixture.detectChanges();
18+
});
19+
20+
it('should create', () => {
21+
expect(component).toBeTruthy();
22+
});
23+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Component } from '@angular/core';
2+
import { Location } from '@angular/common';
3+
4+
@Component({
5+
selector: 'app-coming-soon',
6+
templateUrl: './coming-soon.component.html',
7+
styleUrl: './coming-soon.component.css'
8+
})
9+
export class ComingSoonComponent {
10+
11+
constructor(private location: Location) {
12+
13+
}
14+
15+
goBack(): void {
16+
this.location.back();
17+
}
18+
}

0 commit comments

Comments
 (0)