diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 9e30c2a..ac4f2dd 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -4,12 +4,15 @@ import { CashFlowComponent } from './cash-flow/cash-flow.component'; import { FutureValueComponent } from './future-value/future-value.component'; import { PresentValueComponent } from './present-value/present-value.component' import { DoubleComponent } from './double/double.component'; +import { GainLossComponent } from './gain-loss/gain-loss.component'; + const routes: Routes = [ { path: 'cash-flow', component: CashFlowComponent }, { path: 'future-value-of-money', component: FutureValueComponent }, { path: 'present-value-of-money', component: PresentValueComponent }, - { path: 'time-to-double-investment', component: DoubleComponent } + { path: 'time-to-double-investment', component: DoubleComponent }, + { path: 'percent-gain-or-loss', component: GainLossComponent } ]; @NgModule({ diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 6ca4e47..f2aef03 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -8,6 +8,7 @@ import { CashFlowComponent } from './cash-flow/cash-flow.component'; import { FutureValueComponent } from './future-value/future-value.component'; import { PresentValueComponent } from './present-value/present-value.component'; import { DoubleComponent } from './double/double.component'; +import { GainLossComponent } from './gain-loss/gain-loss.component'; @NgModule({ declarations: [ @@ -15,7 +16,8 @@ import { DoubleComponent } from './double/double.component'; CashFlowComponent, FutureValueComponent, PresentValueComponent, - DoubleComponent + DoubleComponent, + GainLossComponent ], imports: [ BrowserModule, diff --git a/src/app/gain-loss.ts b/src/app/gain-loss.ts new file mode 100644 index 0000000..ba87b7e --- /dev/null +++ b/src/app/gain-loss.ts @@ -0,0 +1,7 @@ +export class GainLoss { + market: number; + purchase: number; + difference: number; + percent: number; + growth: string; +} \ No newline at end of file diff --git a/src/app/gain-loss/gain-loss.component.html b/src/app/gain-loss/gain-loss.component.html new file mode 100644 index 0000000..b759732 --- /dev/null +++ b/src/app/gain-loss/gain-loss.component.html @@ -0,0 +1,26 @@ +
+ By entering a purchase price and the current value of an asset you can calculate what percent you have gained or lost on an particular asset. +
+