Skip to content

Commit 814a2c8

Browse files
committed
Added footer version
1 parent 588e9ac commit 814a2c8

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

eform-client/src/app/components/footer/footer.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
</div>
1313
<div class="footer-copyright text-center p-2 copyright-section">
1414
<p>© Microting A/S 2007 - 2018 </p>
15-
<p>{{version}}</p>
15+
<p>{{appVersion}}</p>
1616
</div>
1717
</footer>

eform-client/src/app/components/footer/footer.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {Component, OnInit, AfterViewInit} from '@angular/core';
22
import {AdminSettingsModel} from 'src/app/common/models/settings';
3+
import {environment} from 'src/environments/environment';
34
import { AppSettingsService} from '../../common/services/app-settings';
45

56
@Component({
@@ -10,6 +11,7 @@ import { AppSettingsService} from '../../common/services/app-settings';
1011
export class FooterComponent implements OnInit, AfterViewInit {
1112
adminSettingsModel: AdminSettingsModel;
1213
version: string;
14+
get appVersion() { return environment.VERSION; }
1315
constructor(private settingsService: AppSettingsService) {
1416
}
1517
ngOnInit() {
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
declare var require: any;
12
export const environment = {
2-
production: true
3+
production: true,
4+
VERSION: require('../../package.json').version
35
};

eform-client/src/environments/environment.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.
33
// The list of file replacements can be found in `angular.json`.
44

5+
declare var require: any;
56
export const environment = {
6-
production: false
7+
production: false,
8+
VERSION: require('../../package.json').version
79
};
810

911
/*

0 commit comments

Comments
 (0)